Class ProxyRequest
java.lang.Object
io.vertx.rxjava3.httpproxy.ProxyRequest
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBody()getURI()inthashCode()headers()static ProxyRequestnewInstance(ProxyRequest arg) proxy(HttpClientRequest request) Proxy this request to the origin server using the specifiedrequestand then send the proxy response.release()Release the proxy request and its associated resources.response()Create and return the proxy response.static ProxyRequestreverseProxy(HttpServerRequest proxiedRequest) Create a newProxyRequestinstance, the proxied request will be paused.static ProxyRequestreverseProxy(HttpServerRequest proxiedRequest, ForwardedHeadersOptions forwardedHeadersOptions) LikereverseProxy(HttpServerRequest)but using specific ForrxProxy(HttpClientRequest request) Proxy this request to the origin server using the specifiedrequestand then send the proxy response.rxSend(HttpClientRequest request) Send this request to the origin server using the specifiedrequest.send(HttpClientRequest request) Send this request to the origin server using the specifiedrequest.setAuthority(HostAndPort authority) Set the request authority.Set the request body to be sent to the origin server.setMethod(HttpMethod method) Set the HTTP method to be sent to the origin server.Set the request URI to be sent to the origin server.toString()version()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ProxyRequest
-
ProxyRequest
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
reverseProxy
Create a newProxyRequestinstance, the proxied request will be paused.- Parameters:
proxiedRequest- theHttpServerRequestthat is proxied- Returns:
- a reference to this, so the API can be used fluently
-
reverseProxy
public static ProxyRequest reverseProxy(HttpServerRequest proxiedRequest, ForwardedHeadersOptions forwardedHeadersOptions) LikereverseProxy(HttpServerRequest)but using specific For- Parameters:
proxiedRequest-forwardedHeadersOptions-- Returns:
-
version
- Returns:
- the HTTP version of the proxied request
-
absoluteURI
- Returns:
- the absolute URI of the proxied request
-
getMethod
- Returns:
- the HTTP method to be sent to the origin server.
-
setMethod
Set the HTTP method to be sent to the origin server.The initial HTTP method value is the proxied request HTTP method.
- Parameters:
method- the new HTTP method- Returns:
- a reference to this, so the API can be used fluently
-
getURI
- Returns:
- the request URI to be sent to the origin server.
-
setURI
Set the request URI to be sent to the origin server.The initial request URI value is the proxied request URI.
- Parameters:
uri- the new URI- Returns:
- a reference to this, so the API can be used fluently
-
getBody
- Returns:
- the request body to be sent to the origin server.
-
setBody
Set the request body to be sent to the origin server.The initial request body value is the proxied request body.
- Parameters:
body- the new body- Returns:
- a reference to this, so the API can be used fluently
-
setAuthority
Set the request authority.- for HTTP/1 the header
- for HTTP/2 the pseudo header
- Parameters:
authority- the authority- Returns:
- a reference to this, so the API can be used fluently
-
getAuthority
- Returns:
- the request authority, for HTTP2 the pseudo header otherwise the header
-
headers
- Returns:
- the headers that will be sent to the origin server, the returned headers can be modified. The headers map is populated with the proxied request headers
-
proxy
Proxy this request to the origin server using the specifiedrequestand then send the proxy response.- Parameters:
request- the request connected to the origin server- Returns:
-
rxProxy
Proxy this request to the origin server using the specifiedrequestand then send the proxy response.- Parameters:
request- the request connected to the origin server- Returns:
-
send
Send this request to the origin server using the specifiedrequest.The returned future will be completed with the proxy response returned by the origin.
- Parameters:
request- the request connected to the origin server- Returns:
-
rxSend
Send this request to the origin server using the specifiedrequest.The returned future will be completed with the proxy response returned by the origin.
- Parameters:
request- the request connected to the origin server- Returns:
-
release
Release the proxy request and its associated resources.The HTTP server request is resumed, no HTTP server response is sent.
- Returns:
- a reference to this, so the API can be used fluently
-
proxiedRequest
- Returns:
- the proxied HTTP server request
-
response
-
newInstance
-