In my project code, there is a requirement to encode the URL. its currently using httpclient 3.1 jar and uses its method URIUtil.encodeQuery() to do the job. but we are upgrading the jar to the newer version, org.apache.httpcomponents 4.4.1.
where I couldn't find any exact substitute for encodeQuery method. it has been discussed in the post What happened to URIUtil.encodePath from commons-httpclient-3.1?.
But still I am looking for any good substitute for encodeQuery(), can anyone has suggestion.
Thanks
In our project we use the URIBuilder class.
https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html
The builder returns the standard java URI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With