HTTP client API
Wenbo Zhu
wenboz at google.com
Fri Aug 26 06:59:53 UTC 2016
Hi Michael,
Thanks for the update! The adoption of the Flow API is indeed a big
improvement (async flow-control is very hard to get right).
Attached is a feedback doc on this new version. One specific idea to
discuss is whether it's possible to release the new HTTP client API as a
standalone library (that works on JDK 9).
Thanks,
Wenbo
On Mon, Aug 22, 2016 at 12:56 AM, Michael McMahon <
michael.x.mcmahon at oracle.com> wrote:
> There is an updated version of the HTTP client API doc [1] and a specdiff
> [2] showing the changes
> proposed from the current version in JDK9 dev.
>
> The main changes are:
>
> 1) The request and response processors are now based on Flow.Publisher and
> Flow.Subscriber
>
> 2) Response bodies are retrieved synchronously with the response headers
> as part of the
> HttpRequest.response() and responseAsync() methods
>
> 3) Because of the change above, to allow code to examine the headers and
> decide what to do
> with the body before retrieving it, there is a new entity called a
> HttpResponse.BodyHandler
> which is given the status code and headers, and which returns a
> HttpResponse.BodyProcessor.
> Static implementations of both body handlers and body processors are
> provided, to make the
> simple cases easy to code.
>
> We are currently working in the sandbox repository again and will have
> these changes
> in the main JDK9 dev forest soon.
>
> Thanks,
>
> Michael
>
> [1] http://cr.openjdk.java.net/~michaelm/httpclient/api/
>
> [2] http://cr.openjdk.java.net/~michaelm/httpclient/specdiffout/
> package-summary.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20160825/bf92db45/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Feedback.pdf
Type: application/pdf
Size: 79112 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20160825/bf92db45/Feedback-0001.pdf>
More information about the net-dev
mailing list