Interface WebClientServiceRequest
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.voidSet 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
-
method
Method method()Returns an HTTP request method. See alsoHTTP standard methodsutility 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.1for HTTP/1.1 andh2for HTTP/2.The selected protocol may change while the downstream service chain executes, for example when an HTTP/2 client falls back to HTTP/1.1. The request exposes the selected wire protocol when the chain returns and through
whenSent()andwhenComplete().- Returns:
- protocol identifier, such as
http/1.1,h2, orh3
-
headers
-
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
-
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
-