Uses of Interface
java.net.http.HttpRequest.Builder
Package | Description |
---|---|
java.net.http |
HTTP Client and WebSocket APIs
|
-
Uses of HttpRequest.Builder in java.net.http
Methods in java.net.http that return HttpRequest.Builder Modifier and Type Method Description HttpRequest.Builder
HttpRequest.Builder. copy()
Returns an exact duplicate copy of thisBuilder
based on current state.HttpRequest.Builder
HttpRequest.Builder. DELETE()
Sets the request method of this builder to DELETE.HttpRequest.Builder
HttpRequest.Builder. expectContinue(boolean enable)
Requests the server to acknowledge the request before sending the body.HttpRequest.Builder
HttpRequest.Builder. GET()
Sets the request method of this builder to GET.HttpRequest.Builder
HttpRequest.Builder. header(String name, String value)
Adds the given name value pair to the set of headers for this request.HttpRequest.Builder
HttpRequest.Builder. headers(String... headers)
Adds the given name value pairs to the set of headers for this request.HttpRequest.Builder
HttpRequest.Builder. method(String method, HttpRequest.BodyPublisher bodyPublisher)
Sets the request method and request body of this builder to the given values.static HttpRequest.Builder
HttpRequest. newBuilder()
Creates anHttpRequest
builder.static HttpRequest.Builder
HttpRequest. newBuilder(URI uri)
Creates anHttpRequest
builder with the given URI.HttpRequest.Builder
HttpRequest.Builder. POST(HttpRequest.BodyPublisher bodyPublisher)
Sets the request method of this builder to POST and sets its request body publisher to the given value.HttpRequest.Builder
HttpRequest.Builder. PUT(HttpRequest.BodyPublisher bodyPublisher)
Sets the request method of this builder to PUT and sets its request body publisher to the given value.HttpRequest.Builder
HttpRequest.Builder. setHeader(String name, String value)
Sets the given name value pair to the set of headers for this request.HttpRequest.Builder
HttpRequest.Builder. timeout(Duration duration)
Sets a timeout for this request.HttpRequest.Builder
HttpRequest.Builder. uri(URI uri)
Sets thisHttpRequest
's requestURI
.HttpRequest.Builder
HttpRequest.Builder. version(HttpClient.Version version)
Sets the preferredHttpClient.Version
for this request.