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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to