users@jersey.java.net

[Jersey] Re: Jersey client upload binary stream not chunked

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Sun, 30 Nov 2014 11:42:39 +0100

Try to specify the REQUEST_ENTITY_PROCESSING <https://jersey.java.net/apidocs/2.13/jersey/org/glassfish/jersey/client/ClientProperties.html#REQUEST_ENTITY_PROCESSING> client-side property and set it's value to "CHUNKED".

Cheers,
Marek

> On 28 Nov 2014, at 18:26, rsupremo <seriouz.accz_at_gmail.com> wrote:
>
> I would like to send octet stream using chunked transfer encoding from
> InputStream using Jersey.
>
> WebTarget target = client.target("http://localhost:8080")
> .path("upload");
>
> Invocation.Builder request = target
> .request();
>
> request.post(Entity.entity(is, MediaType.APPLICATION_OCTET_STREAM_TYPE));
> However Jersey waits until all data is read from the input stream and only
> then sends request with set Content-length. How to achive the chunked
> encoding?
>
>
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Jersey-client-upload-binary-stream-not-chunked-tp7582901.html
> Sent from the Jersey mailing list archive at Nabble.com.