Package dev.gmitch215.bytebox.net.http
package dev.gmitch215.bytebox.net.http
The
java.net.http client, over fetch.
The class library has none of it, so this is supplied rather than replaced. A project writes
java.net.http as it would anywhere and the compiler points the references here.
Two places where the shape of fetch shows through, both recorded on the classes
themselves: a request body is a whole body rather than a stream of items, so
HttpRequest.BodyPublishers is the complete set of them and a publisher of your own fails to
compile; and the same holds of HttpResponse.BodyHandlers. Everything a caller normally
writes - a builder, headers, a timeout, a redirect policy, a string or byte-array body - is here.
- Since:
- 1.0.0
-
ClassDescriptionAn HTTP client, standing in for
java.net.http.HttpClient.Assembles a client.What to do with a redirect.Which HTTP version to use, which on this platform the platform decides.The headers of a request or a response, standing in forjava.net.http.HttpHeaders.A request, standing in forjava.net.http.HttpRequest.A request body.The request bodies there are.Assembles a request.HttpResponse<T>A response, standing in forjava.net.http.HttpResponse.How to read a body.The ways to read a body.