Hi rmillet, You've run into a bug that someone else just reported in JIRA: https://issues.apache.org/jira/browse/HTTPCLIENT-1199
We'll work on getting a fix into the next release. Jon On Thu, May 31, 2012 at 4:48 AM, rmillet <[email protected]> wrote: > Hi, > > I want to replace the deprecated ContentEncodingHttpClient with > DecompressingHttpClient, but the DecompressingHttpClient don't send the > body of the Post request. > (If I use the DefaultHttpClient without the DecompressingHttpClient, the > request sent contains the body and the Content-Type header) > > > Here is what I do: > > HttpClient client = new DecompressingHttpClient(new > DefaultHttpClient()); > > HttpPost request = new HttpPost(new URI("http://tests/post.php > ")); > List<NameValuePair> parameters = new ArrayList<NameValuePair>(); > parameters.add(new BasicNameValuePair("toto", "42")); > request.setEntity(new UrlEncodedFormEntity(parameters, > Consts.UTF_8)); > > client.execute(request); > > > What is the working fashion to send post requests with > DecompressingHttpClient ? > > > Regards, > rmillet >
