HttpParameterCodec : is a codec for encoding and decoding parameters in URLs( Used by HttpParams).
If you need to encode Url you can use the below:
encodeURI assumes that the input is a complete URI that might have some characters which need encoding in it.
encodeURIComponent will encode everything with special meaning, so you use it for components of URIs, such as:
var textSample= "A sentence with symbols & characters that have special meaning?";
var uri = 'http://example.com/foo?hello=' + encodeURIComponent(textSample);