users@jersey.java.net

[Jersey] suppression of content-length header w/ jersey jax-rs client

From: Phillip Ross <phillip.w.g.ross_at_gmail.com>
Date: Wed, 16 Dec 2015 03:23:19 -0500

Hi all,

Does anybody have any hints as to how one might suppress sending a
content-length header in a PUT request with JAX-RS client?

I'm making requests against a REST API which takes a PUT request, but does
not allow sending a content-length header. With CURL it's possible to do
this with the following example:
curl -sS <endpoint>/stor/foo.json?metadata=true -X PUT \
     -H 'content-type: application/json'

I can't seem to figure out a way to prevent jersey jax-rs client from
sending a content-length header along in the request. Anyone have any
ideas?

thanks in advance!
- Phillip