public class ProxyRequestImpl extends java.lang.Object implements ProxyRequest
Constructor and Description |
---|
ProxyRequestImpl(io.vertx.core.http.HttpServerRequest outboundRequest) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
absoluteURI() |
ProxyRequest |
bodyFilter(java.util.function.Function<io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>,io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>> filter)
Set a body filter.
|
Body |
getBody() |
io.vertx.core.http.HttpMethod |
getMethod() |
java.lang.String |
getURI() |
io.vertx.core.MultiMap |
headers() |
io.vertx.core.http.HttpServerRequest |
outboundRequest() |
ProxyRequest |
putHeader(java.lang.CharSequence name,
java.lang.CharSequence value)
Put an HTTP header
|
ProxyRequest |
release()
Release the proxy request.
|
ProxyResponse |
response()
Create and return the proxy response.
|
io.vertx.core.Future<ProxyResponse> |
send(io.vertx.core.http.HttpClientRequest inboundRequest)
Send this request to the origin server using the specified
inbound request.
|
ProxyRequest |
setBody(Body body)
Set the request body to be sent to the origin server.
|
ProxyRequest |
setMethod(io.vertx.core.http.HttpMethod method)
Set the HTTP method to be sent to the origin server.
|
ProxyRequest |
setURI(java.lang.String uri)
Set the request URI to be sent to the origin server.
|
io.vertx.core.http.HttpVersion |
version() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
proxy, reverseProxy
public ProxyRequestImpl(io.vertx.core.http.HttpServerRequest outboundRequest)
public io.vertx.core.http.HttpVersion version()
version
in interface ProxyRequest
public java.lang.String getURI()
getURI
in interface ProxyRequest
public ProxyRequest setURI(java.lang.String uri)
ProxyRequest
The initial request URI value is the outbound request URI.
setURI
in interface ProxyRequest
uri
- the new URIpublic Body getBody()
getBody
in interface ProxyRequest
public ProxyRequest setBody(Body body)
ProxyRequest
The initial request body value is the outbound request body.
setBody
in interface ProxyRequest
body
- the new bodypublic java.lang.String absoluteURI()
absoluteURI
in interface ProxyRequest
public io.vertx.core.http.HttpMethod getMethod()
getMethod
in interface ProxyRequest
public ProxyRequest setMethod(io.vertx.core.http.HttpMethod method)
ProxyRequest
The initial HTTP method value is the outbound request HTTP method.
setMethod
in interface ProxyRequest
method
- the new HTTP methodpublic io.vertx.core.http.HttpServerRequest outboundRequest()
outboundRequest
in interface ProxyRequest
public ProxyRequest release()
ProxyRequest
The HTTP server request is resumed, no HTTP server response is sent.
release
in interface ProxyRequest
public ProxyResponse response()
ProxyRequest
response
in interface ProxyRequest
public ProxyRequest putHeader(java.lang.CharSequence name, java.lang.CharSequence value)
ProxyRequest
putHeader
in interface ProxyRequest
name
- The header namevalue
- The header valuepublic io.vertx.core.MultiMap headers()
headers
in interface ProxyRequest
public ProxyRequest bodyFilter(java.util.function.Function<io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>,io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>> filter)
ProxyRequest
The body filter can rewrite the request body sent to the origin server.
bodyFilter
in interface ProxyRequest
filter
- the filterpublic io.vertx.core.Future<ProxyResponse> send(io.vertx.core.http.HttpClientRequest inboundRequest)
ProxyRequest
The completionHandler
will be called with the proxy response sent by
the origin.
send
in interface ProxyRequest
inboundRequest
- the request connected to the origin
serverCopyright © 2022. All Rights Reserved.