Refresh the incubating Http Client API.
As the API is still incubating ( in the
jdk.incubator.http package ),
there have been several API tweaks. Mainly renaming ( request & response
body processors are now request publisher and response subscriber ),
minor spec clarifications around exceptions, a general tidy up and
changes to address a number of external feedback items.
The processors that deal with request and response bodies have need renamed to closer align with their RX counterparts that they inherit from. This increasing readability of code that uses these types directly:
HttpClient, and its builder
HttpClient.Builder, follow a pattern
where configuration set on the builder is retrievable from the client,
while implementation specific defaults are not. This is generally more
secure, and more easily facilities implementation specific behavior,
e.g. support for system proxies by default.
A new convenience response body handler/subscriber,
that provides a bridge to the blocking input stream API, has been
added, as a result of feedback from the community.
hashCode methods have been defined for
since it appears as a key in a Map parameter type.
To be more friendly for testing and mocking,
HttpHeader has been
changed from an interface to an abstract class with all-but-one methods
having a default implementation. It is also necessary to define its
hashCode, since it is part of the equality of an
HttpResponse class been reworked to provide better visibility into
intermediate responses, e.g. redirection, authentication, etc. The
finalRequest method has been replaced with
support retrieval of all intermediate responses and their headers.
WebSocket, and related nested types, have had the wording in their
specification overhauled, to improve readability. Additionally, the
WebSocket.isClosed method has been replaced with
isOutputClosed, as a result of feedback from the community.
CookieManager has been replaced with the more general type
specdiff.zip, or online at http://cr.openjdk.java.net/~chegar/http_client_sandbox_8191494/specdiff/overview-summary.html