Interface FullClientRequest<T extends ClientRequest<T>>
- Type Parameters:
T- type of the implementation, to support fluent API
- All Superinterfaces:
ClientRequest<T>
- All Known Implementing Classes:
ClientRequestBase, HttpClientRequest
Client request with getters for all configurable options, used for integration with HTTP version implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ClientRequest
ClientRequest.OutputStreamHandlerModifier and TypeInterfaceDescriptionstatic interfaceHandle output stream. -
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<SocketAddress> address()Address of the connection, if configured.default voidClear retained route state after the current top-level request invocation, or when it no longer matches a finalized request target.Possible explicit connection to use (such as when using a proxy).booleanWhether to use keep-alive connection (if relevant for the used HTTP version).method()HTTP method of this request.Replace a placeholder in URI with an actual value.Configured properties.proxy()Proxy configuration (may be no-proxy).Read 100-Continue timeout.Read timeout.Request ID.default Optional<ProxyRoute> Effective proxy route already selected during the current top-level request invocation.default voidselectedProxyRoute(ProxyRoute proxyRoute) Retain an effective proxy route while handing a request between protocol implementations in the current top-level request invocation.Whether Expect 100-Continue header is sent to verify server availability before sending an entity.booleanWhether to skip URI encoding.sni()Request-level SNI configuration.tls()TLS configuration (may be disabled - e.g.uri()URI of this request.Methods inherited from interface ClientRequest
accept, accept, address, connection, contentType, followRedirects, followRedirects, fragment, fragment, header, header, header, headers, headers, headers, keepAlive, maxRedirects, maxRedirects, outputStream, outputStream, path, pathParam, property, proxy, queryParam, readContinueTimeout, readTimeout, request, request, request, requestEntity, requestEntity, resolvedUri, sendExpectContinue, skipUriEncoding, sni, sni, submit, submit, submit, tls, uri, uri, uriModifier and TypeMethodDescriptiondefault TAccepted media types.default Taccept(HttpMediaType... accepted) Accepted media types.default Taddress(SocketAddress socketAddress) Socket address to use.connection(ClientConnection connection) This method is for explicit connection use by this request.default TcontentType(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 TSet fragment of the URI.Set an HTTP header.default Theader(HeaderName name, String... values) Set an HTTP header.default Theader(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.outputStream(ClientRequest.OutputStreamHandler outputStreamConsumer) Handle output stream and submit the request.default <T> ClientResponseTyped<T> outputStream(ClientRequest.OutputStreamHandler outputStreamConsumer, Class<T> requestedType) Handle output stream and request a specific type.default TConfigure 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 HttpClientResponserequest()Request without an entity.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 TConfigure client-side TLS SNI for this request.default Tsni(Consumer<SniConfig.Builder> sni) Configure client-side TLS SNI for this request.Submit an entity.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 TConfigure URI.Configure URI.
-
Method Details
-
pathParams
-
method
-
uri
-
properties
-
requestId
-
connection
Optional<ClientConnection> connection()Possible explicit connection to use (such as when using a proxy).- Returns:
- client connection if explicitly defined
-
address
Address of the connection, if configured.- Returns:
- socket address - may be an
InetSocketAddressorUnixDomainSocketAddress
-
readTimeout
-
readContinueTimeout
Duration readContinueTimeout()Read 100-Continue timeout.- Returns:
- read 100-Continue timeout of this request
-
tls
-
sni
-
proxy
-
selectedProxyRoute
Effective proxy route already selected during the current top-level request invocation. The route may be shared with protocol fallbacks and other internal handoffs in that invocation.- Returns:
- selected proxy route, or empty when this request still needs route selection
-
selectedProxyRoute
Retain an effective proxy route while handing a request between protocol implementations in the current top-level request invocation. The default implementation validates and otherwise ignores the route.- Parameters:
proxyRoute- selected proxy route
-
clearSelectedProxyRoute
default void clearSelectedProxyRoute()Clear retained route state after the current top-level request invocation, or when it no longer matches a finalized request target. The default implementation has no effect. -
keepAlive
boolean keepAlive()Whether to use keep-alive connection (if relevant for the used HTTP version).- Returns:
- whether to use keep alive
-
skipUriEncoding
boolean skipUriEncoding()Whether to skip URI encoding.- Returns:
- whether to skip encoding
-
sendExpectContinue
Whether Expect 100-Continue header is sent to verify server availability before sending an entity. Overrides the setting fromHttpClientConfig.sendExpectContinue().- Returns:
- Expect 100-Continue value if set
-