Interface Http2ClientRequest
- All Superinterfaces:
ClientRequest<Http2ClientRequest>
Request of HTTP/2 client.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ClientRequest
ClientRequest.OutputStreamHandlerModifier and TypeInterfaceDescriptionstatic interfaceHandle output stream. -
Method Summary
Modifier and TypeMethodDescriptionflowControlTimeout(Duration timeout) Outbound flow control blocking timeout.outputStream(ClientRequest.OutputStreamHandler outputStreamConsumer) Handle output stream and submit the request.priority(int priority) Priority defines a weight between 1 and 256 (inclusive) to prioritize this stream by the server.priorKnowledge(boolean priorKnowledge) Configure prior knowledge of HTTP/2 (e.g.default Http2ClientResponserequest()Request without an entity.requestPrefetch(int requestPrefetch) Configure request prefetch, increases both connection and stream inbound flow control window and may send window updates to inform the server, depending on flow control strategy.Submit an entity.Methods inherited from interface ClientRequest
accept, accept, address, connection, contentType, followRedirects, followRedirects, fragment, fragment, header, header, header, headers, headers, headers, keepAlive, maxRedirects, maxRedirects, outputStream, path, pathParam, property, proxy, queryParam, readContinueTimeout, readTimeout, request, request, requestEntity, requestEntity, resolvedUri, sendExpectContinue, skipUriEncoding, sni, sni, submit, submit, tls, uri, uri, uriModifier and TypeMethodDescriptiondefault Http2ClientRequestAccepted media types.default Http2ClientRequestaccept(HttpMediaType... accepted) Accepted media types.default Http2ClientRequestaddress(SocketAddress socketAddress) Socket address to use.connection(ClientConnection connection) This method is for explicit connection use by this request.default Http2ClientRequestcontentType(MediaType contentType) Sets the content type of the request.booleanWhether to follow redirects.followRedirects(boolean followRedirects) Whether to follow redirects.fragment(UriFragment fragment) Set fragment of the URI.default Http2ClientRequestSet fragment of the URI.Set an HTTP header.default Http2ClientRequestheader(HeaderName name, String... values) Set an HTTP header.default Http2ClientRequestheader(HeaderName name, List<String> values) Set an HTTP header with multiple values.headers()Get a (mutable) instance of outgoing headers.Configure headers.headers(Consumer<ClientRequestHeaders> headersConsumer) Update headers.keepAlive(boolean keepAlive) Whether to use keep alive with this request.intMaximal number of redirects to follow.maxRedirects(int maxRedirects) Max number of the followed redirects.default <T> ClientResponseTyped<T> outputStream(ClientRequest.OutputStreamHandler outputStreamConsumer, Class<T> requestedType) Handle output stream and request a specific type.default Http2ClientRequestConfigure path to call.Replace a placeholder in URI with an actual value.Add a property to be used by this request.Proxy configuration for this specific request.queryParam(String name, String... values) Add query parameter.readContinueTimeout(Duration readContinueTimeout) Read 100-Continue timeout for this request.readTimeout(Duration readTimeout) Read timeout for this request.default <E> ClientResponseTyped<E> request(GenericType<E> type) Request without sending an entity.default <E> ClientResponseTyped<E> Request without sending an entity.default <E> ErequestEntity(GenericType<E> type) Request entity without sending a request entity, asking for entity only.default <E> ErequestEntity(Class<E> type) Request entity without sending a request entity, asking for entity only.Resolved URI that will be used to invoke this request.sendExpectContinue(boolean sendExpectContinue) Whether Expect 100-Continue header is sent to verify server availability before sending an entity.skipUriEncoding(boolean skip) Disable uri encoding.default Http2ClientRequestConfigure client-side TLS SNI for this request.default Http2ClientRequestsni(Consumer<SniConfig.Builder> sni) Configure client-side TLS SNI for this request.default <E> ClientResponseTyped<E> submit(Object entity, GenericType<E> requestedType) Submit an entity and request a specific type.default <E> ClientResponseTyped<E> Submit an entity and request a specific type.TLS configuration for this specific request.Configure request URI.default Http2ClientRequestConfigure URI.Configure URI.
-
Method Details
-
priority
Priority defines a weight between 1 and 256 (inclusive) to prioritize this stream by the server. Priorities are a suggestion.- Parameters:
priority- priority to configure for this stream (request/response)- Returns:
- updated request
-
priorKnowledge
Configure prior knowledge of HTTP/2 (e.g. we know the server supports it and we do not need to handle upgrade).- Parameters:
priorKnowledge- set totrueto skip HTTP/1.1 upgrade process and use prior knowledge- Returns:
- updated request
-
requestPrefetch
Configure request prefetch, increases both connection and stream inbound flow control window and may send window updates to inform the server, depending on flow control strategy.- Parameters:
requestPrefetch- inbound flow control window increment in bytes- Returns:
- updated request
-
flowControlTimeout
Outbound flow control blocking timeout.- Parameters:
timeout- duration- Returns:
- updated request
-
request
Description copied from interface:ClientRequestRequest without an entity.- Specified by:
requestin interfaceClientRequest<Http2ClientRequest>- Returns:
- response
-
submit
Description copied from interface:ClientRequestSubmit an entity.- Specified by:
submitin interfaceClientRequest<Http2ClientRequest>- Parameters:
entity- request entity- Returns:
- response
-
outputStream
Description copied from interface:ClientRequestHandle output stream and submit the request.- Specified by:
outputStreamin interfaceClientRequest<Http2ClientRequest>- Parameters:
outputStreamConsumer- output stream to write request entity- Returns:
- response
-