I'm trying to use httpclient-4.0-beta2 to achieve what seems like a
simple thing. I want to make a request to a certain URL with a set of
parameters. My code looks like this:
HttpParams params = new BasicHttpParams();
params.setParameter("someparam", "somevalue");
HttpClient httpClient = new DefaultHttpClient();
HttpUriRequest httpGet = new HttpGet("http://www.someserver.com/
servlet");
httpGet.setParams(params);
HttpResponse response = httpClient.execute(httpGet);
So, I would expect that a URL would be generated that looks like
http://www.someserver/com/servlet?someparam=somevalue
No matter what I do it seems that my parameters are ignored, causing
an error response from the server. Surprisingly none of the examples
cover this simple case. Am I doing something obviously wrong here?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org