- All Superinterfaces:
BaseRequest,InterceptedRequest
An intercepted Web request extending HTTP client InterceptedRequest.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionSets the request authority.getUri()Returns the Web exchange URI.headers(Consumer<OutboundRequestHeaders> headersConfigurer) Configures the HTTP headers to send in the request.Sets the request method.Sets the request path.Methods inherited from interface io.inverno.mod.http.base.BaseRequest
getAuthority, getLocalAddress, getLocalCertificates, getMethod, getPath, getPathAbsolute, getPathBuilder, getQuery, getRemoteAddress, getRemoteCertificates, getScheme, headers, queryParametersMethods inherited from interface io.inverno.mod.http.client.InterceptedRequest
body, isSent
-
Method Details
-
getUri
URI getUri()Returns the Web exchange URI.
- Returns:
- the Web exchange URI
-
headers
InterceptedWebRequest headers(Consumer<OutboundRequestHeaders> headersConfigurer) throws IllegalStateException Description copied from interface:InterceptedRequestConfigures the HTTP headers to send in the request.
- Specified by:
headersin interfaceInterceptedRequest- Parameters:
headersConfigurer- an outbound request headers configurer- Returns:
- the request
- Throws:
IllegalStateException- if the request has already been sent to the endpoint
-
path
Description copied from interface:InterceptedRequestSets the request path.
This actually overrides the request target path provided when the exchange was created using
Endpoint.exchange(io.inverno.mod.http.base.Method, java.lang.String)orEndpoint.exchange(io.inverno.mod.http.base.Method, java.lang.String, io.inverno.mod.http.base.ExchangeContext).- Specified by:
pathin interfaceInterceptedRequest- Parameters:
path- the request target path- Returns:
- the request
- Throws:
IllegalStateException- if the request has already been sent to the endpoint
-
authority
Description copied from interface:InterceptedRequestSets the request authority.
- Specified by:
authorityin interfaceInterceptedRequest- Parameters:
authority- the request authority- Returns:
- the request
- Throws:
IllegalStateException- if the request has already been sent to the endpoint
-
method
Description copied from interface:InterceptedRequestSets the request method.
This actually overrides the method provided when the enclosing exchange was created by the
Endpoint. It defaults toMethod.GETif none is specified.- Specified by:
methodin interfaceInterceptedRequest- Parameters:
method- the request method- Returns:
- the request
- Throws:
IllegalStateException- if the request has already been sent to the endpoint
-