# Uses of Class
java.net.http.HttpRequest

Packages that use HttpRequest
Package
Description
java.net.http
HTTP Client and WebSocket APIs

- ## Uses of HttpRequest in java.net.http

  Methods in java.net.http that return HttpRequest
  Modifier and Type
  Method
  Description
  `HttpRequest`
  HttpRequest.Builder.`build()`
  Builds and returns an `HttpRequest`.
  `HttpRequest`
  HttpResponse.`request()`
  Returns the `HttpRequest` corresponding to this response.
  Methods in java.net.http with parameters of type HttpRequest
  Modifier and Type
  Method
  Description
  `void`
  HttpResponse.PushPromiseHandler.`applyPushPromise(HttpRequest initiatingRequest, HttpRequest pushPromiseRequest, Function<HttpResponse.BodyHandler<T>, CompletableFuture<HttpResponse<T>>> acceptor)`
  Notification of an incoming push promise.
  `static HttpRequest.Builder`
  HttpRequest.`newBuilder(HttpRequest request, BiPredicate<String,String> filter)`
  Creates a `Builder` whose initial state is copied from an existing `HttpRequest`.
  `abstract <T> HttpResponse<T>`
  HttpClient.`send(HttpRequest request, HttpResponse.BodyHandler<T> responseBodyHandler)`
  Sends the given request using this client, blocking if necessary to get the response.
  `abstract <T> CompletableFuture<HttpResponse<T>>`
  HttpClient.`sendAsync(HttpRequest request, HttpResponse.BodyHandler<T> responseBodyHandler)`
  Sends the given request asynchronously using this client with the given response body handler.
  `abstract <T> CompletableFuture<HttpResponse<T>>`
  HttpClient.`sendAsync(HttpRequest request, HttpResponse.BodyHandler<T> responseBodyHandler, HttpResponse.PushPromiseHandler<T> pushPromiseHandler)`
  Sends the given request asynchronously using this client with the given response body handler and push promise handler.
  Method parameters in java.net.http with type arguments of type HttpRequest
  Modifier and Type
  Method
  Description
  `static <T> HttpResponse.PushPromiseHandler<T>`
  HttpResponse.PushPromiseHandler.`of(Function<HttpRequest, HttpResponse.BodyHandler<T>> pushPromiseHandler, ConcurrentMap<HttpRequest, CompletableFuture<HttpResponse<T>>> pushPromisesMap)`
  Returns a push promise handler that accumulates push promises, and their responses, into the given map.
  `static <T> HttpResponse.PushPromiseHandler<T>`
  HttpResponse.PushPromiseHandler.`of(Function<HttpRequest, HttpResponse.BodyHandler<T>> pushPromiseHandler, ConcurrentMap<HttpRequest, CompletableFuture<HttpResponse<T>>> pushPromisesMap)`
  Returns a push promise handler that accumulates push promises, and their responses, into the given map.