Help Angular by taking a 1 minute survey!Go to surveyHome

HttpUrlEncodingCodec

A class that uses encodeURIComponent and decodeURIComponent to serialize and parse URL parameter keys and values. If you pass URL query parameters without encoding, the query parameters can get misinterpreted at the receiving end. Use the HttpParameterCodec class to encode and decode the query-string values.

      
      class HttpUrlEncodingCodec implements HttpParameterCodec {
  encodeKey(key: string): string
  encodeValue(value: string): string
  decodeKey(key: string): string
  decodeValue(value: string)
}
    

Methods

encodeKey(key: string): string
      
      encodeKey(key: string): string
    
Parameters
key string
Returns

string

encodeValue(value: string): string
      
      encodeValue(value: string): string
    
Parameters
value string
Returns

string

decodeKey(key: string): string
      
      decodeKey(key: string): string
    
Parameters
key string
Returns

string

decodeValue(value: string)
      
      decodeValue(value: string)
    
Parameters
value string