class
final
Provides encoding and decoding of URL parameter and query-string values.
class HttpUrlEncodingCodec implements HttpParameterCodec { encodeKey(key: string): string encodeValue(value: string): string decodeKey(key: string): string decodeValue(value: string) }
Serializes and parses URL parameter keys and values to encode and decode them. If you pass URL query parameters without encoding, the query parameters can be misinterpreted at the receiving end.
encodeKey() | |||
---|---|---|---|
Encodes a key name for a URL parameter or query-string. | |||
|
key | string | The key name. |
string
: The encoded key name.
encodeValue() | |||
---|---|---|---|
Encodes the value of a URL parameter or query-string. | |||
|
value | string | The value. |
string
: The encoded value.
decodeKey() | |||
---|---|---|---|
Decodes an encoded URL parameter or query-string key. | |||
|
key | string | The encoded key name. |
string
: The decoded key name.
decodeValue() | |||
---|---|---|---|
Decodes an encoded URL parameter or query-string value. | |||
|
value | string | The encoded value. |
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/common/http/HttpUrlEncodingCodec