- All Superinterfaces:
BaseRequest,Request
A request with supports for body encoding based on the request content type.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionSets the request authority.body()Returns the request body when the request method allows it.getUri()Returns the Web request 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.Request
isHeadersWritten
-
Method Details
-
getUri
URI getUri()Returns the Web request URI.
- Returns:
- the request URI
-
headers
Description copied from interface:RequestConfigures the HTTP headers to send in the request.
- Specified by:
headersin interfaceRequest- 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:RequestSets the request path.
This actually overrides the request target path provided when the request 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 interfaceRequest- 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:RequestSets the request authority.
- Specified by:
authorityin interfaceRequest- 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:RequestSets 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 interfaceRequest- Parameters:
method- the request method- Returns:
- the request
- Throws:
IllegalStateException- if the request has already been sent to the endpoint
-
body
Description copied from interface:RequestReturns the request body when the request method allows it.
- Specified by:
bodyin interfaceRequest- Returns:
- the request body when the method allows it (i.e.
POSTPUT...) - Throws:
IllegalStateException- if the method does not allow a body in the request (i.e.GET...) or if the request has already been sent to the endpoint
-