- 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, queryParameters
Methods 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:InterceptedRequest
Configures the HTTP headers to send in the request.
- Specified by:
headers
in 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:InterceptedRequest
Sets 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:
path
in 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:InterceptedRequest
Sets the request authority.
- Specified by:
authority
in 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:InterceptedRequest
Sets the request method.
This actually overrides the method provided when the enclosing exchange was created by the
Endpoint
. It defaults toMethod.GET
if none is specified.- Specified by:
method
in interfaceInterceptedRequest
- Parameters:
method
- the request method- Returns:
- the request
- Throws:
IllegalStateException
- if the request has already been sent to the endpoint
-