public interface RoutingContext
| Modifier and Type | Method and Description |
|---|---|
List<MediaType> |
acceptTypes()
Returns a list of
MediaTypes that are specified in HttpHeaderNames.ACCEPT in the order
of client-side preferences. |
MediaType |
contentType()
Returns
MediaType specified by 'Content-Type' header of the request. |
HttpStatusException |
deferredStatusException()
Returns a deferred
HttpStatusException which was previously set via
deferStatusException(HttpStatusException). |
void |
deferStatusException(HttpStatusException cause)
Defers throwing an
HttpStatusException until reaching the end of the service list. |
String |
hostname()
Returns the virtual host name of the request.
|
boolean |
isCorsPreflight()
Returns
true if this context is for a CORS preflight request. |
HttpMethod |
method()
Returns
HttpMethod of the request. |
default RoutingContext |
overridePath(String path)
Returns a wrapped
RoutingContext which holds the specified path. |
String |
path()
Returns the absolute path retrieved from the request,
as defined in RFC3986.
|
String |
query()
Returns the query retrieved from the request,
as defined in RFC3986.
|
VirtualHost |
virtualHost()
Returns the
VirtualHost instance which belongs to this RoutingContext. |
VirtualHost virtualHost()
VirtualHost instance which belongs to this RoutingContext.String hostname()
HttpMethod method()
HttpMethod of the request.@Nullable MediaType contentType()
MediaType specified by 'Content-Type' header of the request.List<MediaType> acceptTypes()
MediaTypes that are specified in HttpHeaderNames.ACCEPT in the order
of client-side preferences. If the client does not send the header, this will contain only
MediaType.ANY_TYPE.void deferStatusException(HttpStatusException cause)
HttpStatusException until reaching the end of the service list.@Nullable HttpStatusException deferredStatusException()
HttpStatusException which was previously set via
deferStatusException(HttpStatusException).default RoutingContext overridePath(String path)
RoutingContext which holds the specified path.
It is usually used to find an HttpService with a prefix-stripped path.boolean isCorsPreflight()
true if this context is for a CORS preflight request.Copyright © 2020 LeanCloud. All rights reserved.