public interface WebClientServiceRequest
Request to SPI
WebClientService
that supports modification of the outgoing request.-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Registry that can be used to propagate information from server (e.g.headers()
Configured request headers.method()
Returns an HTTP request method.Properties configured by user when creating this client request.Returns an HTTP protocol ID, mapped to a specific version.Request id which will be used in logging messages.void
Set new request id.uri()
URI helper for this client request.Completes when the full processing of this request is done (e.g.whenSent()
Completes when the request part of this request is done (e.g.
-
Method Details
-
uri
ClientUri uri()URI helper for this client request.- Returns:
- URI helper
-
method
Method method()Returns an HTTP request method. See alsoHTTP standard methods
utility class.- Returns:
- an HTTP method
- See Also:
-
protocolId
String protocolId()Returns an HTTP protocol ID, mapped to a specific version. This is the same ID that is used for ALPN (protocol negotiation) -http/1.1
for HTTP/1.1 andh2
for HTTP/2.If communication starts as a
HTTP/1.1
withh2c
upgrade, then it will be automatically upgraded and this method returnsHTTP/2.0
.- Returns:
- an HTTP version
-
headers
ClientRequestHeaders headers()Configured request headers.- Returns:
- headers (mutable)
-
context
Context context()Registry that can be used to propagate information from server (e.g. security context, tracing spans etc.).- Returns:
- registry propagated by the user
-
requestId
String requestId()Request id which will be used in logging messages.- Returns:
- current request id
-
requestId
Set new request id. This id is used in logging messages.- Parameters:
requestId
- new request id
-
whenSent
CompletionStage<WebClientServiceRequest> whenSent()Completes when the request part of this request is done (e.g. we have sent all headers and bytes).- Returns:
- completion stage that finishes when we fully send request (including entity) to server
-
whenComplete
CompletionStage<WebClientServiceResponse> whenComplete()Completes when the full processing of this request is done (e.g. we have received a full response).- Returns:
- completion stage that finishes when we receive and fully read response from the server
-
properties
Properties configured by user when creating this client request.- Returns:
- properties that were configured (mutable)
-