You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Eduardo Martins <em...@gmail.com> on 2009/12/02 08:03:23 UTC

HTTP URI Percent Encoding ?

Hello, does the new HTTP Client API provides any means for percent encoding
the request URI ?

-- Eduardo

-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
http://emmartins.blogspot.com

Re: HTTP URI Percent Encoding ?

Posted by Charles François Rey <ch...@gmail.com>.
What about the java.net.URLEncoder ? It behaves slightly differently from what is described in RFC-3986 (translates the space char as + instead of %20), but may be it will do the job for you ?

If you want "true" URI escaping, maybe you should take a look at http://code.google.com/p/gdata-java-client/source/browse/trunk/java/src/com/google/gdata/util/common/base/CharEscapers.java and its uriEscaper(..). Not tried in practice, but it looks good.

-- CFR

On 2 déc. 2009, at 08:03, Eduardo Martins wrote:

> Hello, does the new HTTP Client API provides any means for percent encoding
> the request URI ?
> 
> -- Eduardo
> 
> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
> http://emmartins.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org