public class HttpServerRequestUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
increaseRequestHops(io.vertx.core.http.HttpServerRequest request)
Increases the value of the
HttpRequestHeader.X_HOPS header. |
static boolean |
isRemoteAddressLoopbackAddress(io.vertx.core.http.HttpServerRequest request) |
static boolean |
isRequestHopsLimitExceeded(io.vertx.core.http.HttpServerRequest request,
Integer hopsLimit)
Checks whether the request hops limit is reached based on the
HttpRequestHeader.X_HOPS header. |
static void |
prepareResponse(io.vertx.core.http.HttpServerRequest request,
io.vertx.core.http.HttpClientResponse response)
Prepares the request's response by copying values from response.
|
public static boolean isRemoteAddressLoopbackAddress(io.vertx.core.http.HttpServerRequest request)
public static void increaseRequestHops(io.vertx.core.http.HttpServerRequest request)
HttpRequestHeader.X_HOPS header. Adds the header when not already present.request - the request to increase the header valuepublic static boolean isRequestHopsLimitExceeded(io.vertx.core.http.HttpServerRequest request,
Integer hopsLimit)
HttpRequestHeader.X_HOPS header.request - the request to checkhopsLimit - the request hops limitHttpRequestHeader.X_HOPS header value is greater than the hopsLimit parameterpublic static void prepareResponse(io.vertx.core.http.HttpServerRequest request,
io.vertx.core.http.HttpClientResponse response)
request - the request to modifyresponse - the response containing needed valuesCopyright © 2016–2020. All rights reserved.