MCPcopy Index your code
hub / github.com/angular/angular / HttpUrlEncodingCodec

Class HttpUrlEncodingCodec

packages/common/http/src/params.ts:40–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 * @publicApi
39 */
40export class HttpUrlEncodingCodec implements HttpParameterCodec {
41 /**
42 * Encodes a key name for a URL parameter or query-string.
43 * @param key The key name.
44 * @returns The encoded key name.
45 */
46 encodeKey(key: string): string {
47 return standardEncoding(key);
48 }
49
50 /**
51 * Encodes the value of a URL parameter or query-string.
52 * @param value The value.
53 * @returns The encoded value.
54 */
55 encodeValue(value: string): string {
56 return standardEncoding(value);
57 }
58
59 /**
60 * Decodes an encoded URL parameter or query-string key.
61 * @param key The encoded key name.
62 * @returns The decoded key name.
63 */
64 decodeKey(key: string): string {
65 return decodeURIComponent(key);
66 }
67
68 /**
69 * Decodes an encoded URL parameter or query-string value.
70 * @param value The encoded value.
71 * @returns The decoded value.
72 */
73 decodeValue(value: string) {
74 return decodeURIComponent(value);
75 }
76}
77
78function paramParser(rawParams: string, codec: HttpParameterCodec): Map<string, string[]> {
79 const map = new Map<string, string[]>();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…