Hello Oleg, Yes, I saw it, but I also saw "Returns a String that is suitable for use as an application/x-www-form-urlencoded list of parameters in an HTTP PUT or HTTP POST". PUT and POST, but it does not say anything about GET. But now I suppose that this string is also suitable for use with GET.
Thanks, Joan. -----Mensaje original----- De: Oleg Kalnichevski [mailto:[email protected]] Enviado el: jueves, 29 de enero de 2009 23:44 Para: HttpClient User Discussion Asunto: Re: GET METHOD 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? Ive tried to find any > sample after looking at the api and the documentation, and Im 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/htt p/client/utils/URLEncodedUtils.html#format(java.util.List,%20java.lang.Strin g) 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
