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 Asplund Marko <ma...@ixonos.com> on 2009/12/09 21:19:50 UTC

URL encoding issues: HC Client throws URISyntaxException

I'm trying to use HttpComponents Client for fetching data from a web site.
I've ran into problems that seem to be related with the way the
request URL query parameters are handled on the server side.
The service doesn't encode unsafe characters (e.g. '{' and '}') in response URLs.
Also when these characters are encoded on the client prior to issuing the request
the service gives incorrect responses.

The URLs are of the following form:

http://www.foo.bar/foobar?${APPL}=hetekaue

On the otherhand HC Client doesn't allow me to send requests with invalid query syntax
(HttpGet(String) constructor throws an URISyntaxException).

What would be the best way to workaround the issue?

HttpURLConnection doesn't have this problem but I'd rather use HC Client if possible.


marko

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