-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents requested normalised URI path. -
Method Summary
Modifier and TypeMethodDescriptiondefault URIAbsolute URI of the incoming request, including query parameters and fragment.Request to close the connection and report success or failure asynchronously with returned single.content()ReturnsMessageBodyReadableContentreactive representation of the request content.context()Returns a request context as a child ofWebServercontext.fragment()Returns a decoded request URI fragment without leading hash '#' character.headers()Returns http request headers.booleanisSecure()Returns an indicating whether this request was made using a secure channel, such as HTTPS.Returns the Internet Protocol (IP) address of the interface on which the request was received.intReturns the Internet Protocol (IP) port number of the interface on which the request was received.method()Returns an HTTP request method.voidnext()Continue request processing on the next registered handler.voidContinues or enters an error branch of a request processing.path()Returns a path which was accepted by matcher in actual routing.query()Returns an encoded query string without leading '?' character.Returns query parameters.Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.intReturns the Internet Protocol (IP) source port of the client or last proxy that sent the request.URI as requested by the originating client (to the best of our ability to compute it).longA unique correlation ID that is associated with this request and its associated response.Returns a span context related to the current request.tracer()uri()Returns a Request-URI (or alternatively path) as defined in request line.version()Returns an HTTP version from the request line.Returns actualWebServerinstance.
-
Method Details
-
next
void next()Continue request processing on the next registered handler.If error is being handled, this is identical to calling
next(Throwable)with a cause of the error. -
next
Continues or enters an error branch of a request processing. This call has identical effect to throwing the exceptiontexcept that the exception is directly passed to a next registeredErrorHandlerand this it's faster.It is not possible to leave error request processing and continue in registered
Handler.- Parameters:
t- a cause that is directly passed to a next registeredErrorHandler
-
webServer
WebServer webServer()Returns actualWebServerinstance.- Returns:
- actual
WebServerinstance
-
context
Context context()Returns a request context as a child ofWebServercontext.- Returns:
- a request context
-
localAddress
String localAddress()Returns the Internet Protocol (IP) address of the interface on which the request was received.- Returns:
- an address
-
localPort
int localPort()Returns the Internet Protocol (IP) port number of the interface on which the request was received.- Returns:
- the port number
-
remoteAddress
String remoteAddress()Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.- Returns:
- the address of the client that sent the request
-
remotePort
int remotePort()Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.- Returns:
- the port number.
-
isSecure
boolean isSecure()Returns an indicating whether this request was made using a secure channel, such as HTTPS.- Returns:
trueif the request was made using a secure channel
-
headers
RequestHeaders headers()Returns http request headers.- Returns:
- an http headers
-
content
MessageBodyReadableContent content()ReturnsMessageBodyReadableContentreactive representation of the request content.- Returns:
- a request content
- See Also:
-
requestId
long requestId()A unique correlation ID that is associated with this request and its associated response.- Returns:
- a unique correlation ID associated with this request and its response
-
spanContext
Optional<SpanContext> spanContext()Returns a span context related to the current request.SpanContextis a tracing component from opentracing.io standard.- Returns:
- the related span context, empty if not enabled
-
tracer
Tracer tracer()- Returns:
- the tracer associated, or
Tracer.global()
-
closeConnection
Request to close the connection and report success or failure asynchronously with returned single. After connection is closed it is not possible to use it again.- Returns:
- Single completed when connection is closed.
-
absoluteUri
Absolute URI of the incoming request, including query parameters and fragment. The host and port are obtained from the interface this server listens on (hostheader is not used).- Returns:
- the URI of incoming request
-
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
UriQuery queryParams()Returns query parameters.- Returns:
- an parameters representing query parameters
-
path
ServerRequest.Path path()Returns a path which was accepted by matcher in actual routing. It is path without a context root of the routing.Use
ServerRequest.Path.absolute()method to obtain absolute request URI path representation.Returned
ServerRequest.Pathalso provide 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
-
requestedUri
UriInfo requestedUri()URI as requested by the originating client (to the best of our ability to compute it). By default, the URI is from theHttp.Header.HOSTheader on the current request. If requested URI discovery is enabled by configuration, additional headers (such asHttp.Header.FORWARDED) may be used to derive the originally-requested URI.- Returns:
- uri info that can be used for redirects
-