« Return to Thread: Request parameters?

Re: Request parameters?

by Kevin Roll :: Rate this Message:

Reply to Author | View in Thread


On Jul 2, 2009, at 10:09 AM, Oz Levanon wrote:

> I'm not using httpclient version 4, so I couldn't compile your code,  
> but
> it seems to me your confusing two different types of parameters.
> The parameter you want are the URL parameters. To send them simply add
> your data to the URL you create (taking care to put "?" before the  
> first
> parameter and "&" before subsequent parameters). For example:
>
> HttpUriRequest httpGet = new
> HttpGet("http://www.someserver.com/servlet?parm1=value1&parm2=value2&par
> m3=value3");


I thought that might be the case, but then what's the point of using  
HttpClient? I'm looking for an abstraction of this complexity, and if  
it's not provided I'm rather frustrated (I've already spent hours on  
this).

By way of comparison, this fragment was originally written using  
HttpUnit. The code is almost identical, but in that case the URL gets  
constructed the way I expect and I get the proper results. I can't use  
HttpUnit any more due to a jar file conflict, so I'm looking for other  
solutions...

Thanks for the reply, Oz.


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

 « Return to Thread: Request parameters?