users@jersey.java.net

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

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Wed, 16 Dec 2015 09:26:25 +0100

Hi Philip,

does it really make sense to send content-type without content-length?

Pavel

On 16/12/15 09:23, Phillip Ross wrote:
> 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