public interface HttpServerRequest extends NettyInbound, HttpServerInfos
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
hostAddress()
Returns the address of the host peer or
null in case of Unix Domain Sockets. |
boolean |
isFormUrlencoded()
Returns true if the request has
Content-Type with value application/x-www-form-urlencoded. |
boolean |
isMultipart()
Returns true if the request has
Content-Type with value multipart/form-data. |
String |
param(CharSequence key)
URI parameter captured via
{} e.g. |
Map<String,String> |
params()
Returns all URI parameters captured via
{} e.g. |
HttpServerRequest |
paramsResolver(Function<? super String,Map<String,String>> paramsResolver)
Specifies a params resolver.
|
default Flux<HttpContent> |
receiveContent()
Returns a
Flux of HttpContent containing received chunks |
Flux<HttpData> |
receiveForm()
When the request is
POST and have Content-Type with value
application/x-www-form-urlencoded or multipart/form-data,
returns a Flux of HttpData containing received Attribute/FileUpload. |
Flux<HttpData> |
receiveForm(Consumer<HttpServerFormDecoderProvider.Builder> formDecoderBuilder)
When the request is
POST and have Content-Type with value
application/x-www-form-urlencoded or multipart/form-data,
returns a Flux of HttpData containing received Attribute/FileUpload. |
InetSocketAddress |
remoteAddress()
Returns the address of the remote peer or
null in case of Unix Domain Sockets. |
HttpHeaders |
requestHeaders()
Returns inbound
HttpHeaders |
String |
scheme()
Returns the current protocol scheme
|
HttpServerRequest |
withConnection(Consumer<? super Connection> withConnection)
Calls the passed callback with a
Connection to operate on the
underlying Channel state. |
receive, receiveObjectallCookiescookies, fullPath, isKeepAlive, isWebsocket, method, path, requestId, uri, versionHttpServerRequest withConnection(Consumer<? super Connection> withConnection)
NettyInboundConnection to operate on the
underlying Channel state. This allows for chaining inbound API.withConnection in interface NettyInboundwithConnection - connection callbackConnection@Nullable String param(CharSequence key)
{} e.g. /test/{param}.key - parameter name e.g. "param" in URI /test/{param}@Nullable Map<String,String> params()
{} e.g. /test/{param1}/{param2} as key/value map.HttpServerRequest paramsResolver(Function<? super String,Map<String,String>> paramsResolver)
paramsResolver - a params resolverHttpServerRequestdefault Flux<HttpContent> receiveContent()
Flux of HttpContent containing received chunksFlux of HttpContent containing received chunksboolean isFormUrlencoded()
Content-Type with value application/x-www-form-urlencoded.Content-Type with value application/x-www-form-urlencoded,
false - otherwiseboolean isMultipart()
Content-Type with value multipart/form-data.Content-Type with value multipart/form-data,
false - otherwiseFlux<HttpData> receiveForm()
POST and have Content-Type with value
application/x-www-form-urlencoded or multipart/form-data,
returns a Flux of HttpData containing received Attribute/FileUpload.
When the request is not POST or does not have Content-Type
with value application/x-www-form-urlencoded or multipart/form-data,
a Flux.error(Throwable) will be returned.
Uses HTTP form decoder configuration specified on server level or the default one if nothing is configured.
HttpData.retain() disables auto memory release on each HttpData published,
retaining in order to prevent premature recycling when HttpData is accumulated downstream.
Flux of HttpData containing received Attribute/FileUploadFlux<HttpData> receiveForm(Consumer<HttpServerFormDecoderProvider.Builder> formDecoderBuilder)
POST and have Content-Type with value
application/x-www-form-urlencoded or multipart/form-data,
returns a Flux of HttpData containing received Attribute/FileUpload.
When the request is not POST or does not have Content-Type
with value application/x-www-form-urlencoded or multipart/form-data,
a Flux.error(Throwable) will be returned.
HttpData.retain() disables auto memory release on each HttpData published,
retaining in order to prevent premature recycling when HttpData is accumulated downstream.
formDecoderBuilder - HttpServerFormDecoderProvider.Builder for HTTP form decoder configurationFlux of HttpData containing received Attribute/FileUpload@Nullable InetSocketAddress hostAddress()
null in case of Unix Domain Sockets.@Nullable InetSocketAddress remoteAddress()
null in case of Unix Domain Sockets.HttpHeaders requestHeaders()
HttpHeadersHttpHeadersString scheme()