Package io.helidon.reactive.webclient
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.fragment()Returns a decoded request URI fragment without leading hash '#' character.voidSet the new fragment of the request.headers()Configured request headers.host()Host of the request uri.voidSet new host of the request.method()Returns an HTTP request method.path()Returns a path which was accepted by matcher in actual routing.voidSet the new path of the request.intport()Port of the request uri.voidport(int port) Set new port of the request.Properties configured by user when creating this client request.query()Returns an encoded query string without leading '?' character.Returns query parameters.longRequest id which will be used in logging messages.voidrequestId(long requestId) Set new request id.schema()Schema of the request uri.voidSet new schema of the request.uri()Returns a Request-URI (or alternatively path) as defined in request line.version()Returns an HTTP version from the request line.Completes when the full processing of this request is done (e.g.Completes when the response headers has been received, but entity has not been processed yet.whenSent()Completes when the request part of this request is done (e.g.
-
Method Details
-
method
Http.Method method()Returns an HTTP request method. See alsoHTTP standard methodsutility class.- Returns:
- an HTTP method
- See Also:
-
version
Http.Version version()Returns an HTTP version from the request line.See
HTTP Versionenumeration for supported versions.If communication starts as a
HTTP/1.1withh2cupgrade, then it will be automatically upgraded and this method returnsHTTP/2.0.- Returns:
- an HTTP version
-
uri
URI uri()Returns a Request-URI (or alternatively path) as defined in request line.- Returns:
- a request URI
-
query
String query()Returns an encoded query string without leading '?' character.- Returns:
- an encoded query string
-
queryParams
UriQueryWriteable queryParams()Returns query parameters.- Returns:
- an parameters representing query parameters
-
path
UriPath path()Returns a path which was accepted by matcher in actual routing. It is path without a context root of the routing.Use
UriPath.absolute()method to obtain absolute request URI path representation.Returned
UriPathalso provides access to path template parameters. An absolute path then provides access to all (including) context parameters if any. In case of conflict between parameter names, most recent value is returned.- Returns:
- a path
-
fragment
String fragment()Returns a decoded request URI fragment without leading hash '#' character.- Returns:
- a decoded URI fragment
-
headers
WebClientRequestHeaders 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
long requestId()Request id which will be used in logging messages.- Returns:
- current request id
-
requestId
void requestId(long requestId) Set new request id. This id is used in logging messages.- Parameters:
requestId- new request id
-
whenSent
Single<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
-
whenResponseReceived
Single<WebClientServiceResponse> whenResponseReceived()Completes when the response headers has been received, but entity has not been processed yet.- Returns:
- completion stage that finishes when we received headers
-
whenComplete
Single<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)
- See Also:
-
schema
String schema()Schema of the request uri. This will not match schema returned byuri()if changed byschema(String schema)- Returns:
- schema of the request
-
schema
Set new schema of the request.- Parameters:
schema- new request schema
-
host
String host()Host of the request uri. This will not match host returned byuri()if changed byhost(String host)- Returns:
- host of the request
-
host
Set new host of the request.- Parameters:
host- new request host
-
port
int port()Port of the request uri. This will not match port returned byuri()if changed byport(int port)- Returns:
- port of the request
-
port
void port(int port) Set new port of the request.- Parameters:
port- new request port
-
path
Set the new path of the request.- Parameters:
path- new request path
-
fragment
Set the new fragment of the request.- Parameters:
fragment- new request fragment
-