- All Superinterfaces:
ClientRequest<Http2ClientRequest>
Request of HTTP/2 client.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webclient.api.ClientRequest
ClientRequest.OutputStreamHandler -
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 io.helidon.webclient.api.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, requestTarget, resolvedUri, sendExpectContinue, skipUriEncoding, submit, submit, tls, uri, uri, 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. For HTTP/1.1 streamed entities, entity writing can run on a helper virtual thread using the current Helidon context. This includesInstanceWriter.write(java.io.OutputStream)andEntityWriterimplementations without instance-writer support. The writer can prepare request headers before its first output, and this method waits for the writer to terminate, including when an early response cancels the upload. Writers must release owned resources when output fails. Custom writers must not assume caller-thread affinity or propagation of arbitrary thread-local state.- Specified by:
submitin interfaceClientRequest<Http2ClientRequest>- Parameters:
entity- request entity- Returns:
- response
-
outputStream
Description copied from interface:ClientRequestHandle output stream and submit the request. For HTTP/1.1, request headers are sent before invoking the handler when negotiatingExpect: 100-continue. An early final response or a redirect that discards the request entity can therefore bypass the handler entirely. Configure request headers before calling this method, rather than inside the handler.A handler that writes no bytes can still trigger the HTTP/1.1 handshake when the content length is unknown. An explicit content length of zero bypasses the handshake. A method-preserving redirect received after an upload can invoke the handler again to replay the entity. Account for both bypass and replay when the handler has side effects or consumes a one-shot source.
- Specified by:
outputStreamin interfaceClientRequest<Http2ClientRequest>- Parameters:
outputStreamConsumer- handler that writes and closes the request output stream- Returns:
- response
-