users@jersey.java.net

[Jersey] Disabling chunked transfer encoding

From: <java.net_at_byrman.demon.nl>
Date: Tue, 3 Jul 2012 12:27:57 +0000 (GMT)

Hi users,

I am using the Jersey client API to communicate with a restfull web
service. The service does not seem to support chunked transfer
encoding, but I do not manage to turn it off when using the Apache HTTP
client. For example, this does not disable chunking:

Client client = ApacheHttpClient4.create();
client.setChunkedEncodingSize(null);

This does work (using Jersey's default client):

Client client = Client.create();
client.setChunkedEncodingSize(null);

But I really need the Apache client... Perhaps chunking will be
disabled if I enforce an HTTP 1.0 request (instead of HTTP 1.1), but I
don't know how to configure that. Any ideas?

Carsten