URL Encoding/Decoding
807588Feb 11 2009 — edited Feb 16 2009Hi ,
I am trying to send an HttpRequest to a web server using the org.apache.commons.httpclient
Now the problem i am facing is if the URL has some special characters like a space,`,\, ... the GetMethod() of httpClient throws an IllegalArgumentException.
I tried to use URLEncode and other java classes but that does not work since it encodes the "/" in the URL as well, and also sometimes the input URL may be already encoded so i don't want to encode it again.
Please suggest a proper way to handle the situation.
Thanks,
Sunil.