hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Re[2]: encode spaces and other chars in url
Date Thu, 18 Jan 2007 12:53:07 GMT
On Mon, 2007-01-15 at 10:05 +0200, Paranoid wrote:
> thanx for reply, but this updates full url, may be there is some way to encode part after
http:// without string merging?
> 

You can use java.net.URI or org.apache.commons.httpclient.URI to parse
the URL and then apply URL coding to individual elements as you see fit.

Hope this helps

Oleg


> > try java.net.URLEncoder.encode(yourUrlStr, "UTF-8");
> > 
> > Paranoid wrote:
> > > hi all!
> > >
> > > have a question - what to use if there are some spaces or special chars in
url that have to be replaced with %20 or other codes?
> > > there is a problem not to recode http:// part... may be you have some suggestions?
> > >
> > > thanx for attention!
>     
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


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


Mime
View raw message