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: GET METHOD
Date Thu, 29 Jan 2009 22:43:46 GMT
Joan Balagueró wrote:
> Hello,
> 
>  
> 
> With HttpClient 3, I set a NameValuePair[] to the Get method using 
> “setQueryString”.
> 
>  
> 
> Which is the way in HttpClient 4 to do the same? I’ve tried to find any 
> sample after looking at the api and the documentation, and I’m not able 
> to find out how to do this.
> 
>  
> 
> Thanks,
> 

Joan

You can use URLEncodedUtils#format method to generate a query string 
from an array of NameValuePairs

http://hc.apache.org/httpcomponents-client/httpclient/apidocs/org/apache/http/client/utils/URLEncodedUtils.html#format(java.util.List,%20java.lang.String)

Hope this helps

Oleg


> 	
> 
> *JOAN BALAGUERÓ *
> 
> *GRUPO VENTUS*
> 
> C/ Balmes 195, 4º 4ª // 08006 BCN
> Telf.: 902 43 05 75 // Fax: 93 292 01 49
> 
> www.grupoventus.com <http://www.grupoventus.com>
> 
>  __
> 
>  
> 
>  
> 
>  
> 


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


Mime
View raw message