public class ProxyRequest extends Object
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static TypeArg<ProxyRequest> |
__TYPE_ARG |
Constructor and Description |
---|
ProxyRequest(Object delegate) |
ProxyRequest(io.vertx.httpproxy.ProxyRequest delegate) |
Modifier and Type | Method and Description |
---|---|
String |
absoluteURI() |
ProxyRequest |
bodyFilter(Function<ReadStream<Buffer>,io.reactivex.rxjava3.core.Flowable<Buffer>> filter)
Set a body filter.
|
boolean |
equals(Object o) |
Body |
getBody() |
io.vertx.httpproxy.ProxyRequest |
getDelegate() |
io.vertx.core.http.HttpMethod |
getMethod() |
String |
getURI() |
int |
hashCode() |
MultiMap |
headers() |
static ProxyRequest |
newInstance(io.vertx.httpproxy.ProxyRequest arg) |
HttpServerRequest |
outboundRequest() |
io.reactivex.rxjava3.core.Completable |
proxy(HttpClientRequest inboundRequest)
Proxy this outbound request and response to the origin server using the specified inbound request.
|
ProxyRequest |
release()
Release the proxy request.
|
ProxyResponse |
response()
Create and return the proxy response.
|
static ProxyRequest |
reverseProxy(HttpServerRequest outboundRequest)
Create a new
ProxyRequest instance, the outbound request will be paused. |
io.reactivex.rxjava3.core.Completable |
rxProxy(HttpClientRequest inboundRequest)
Proxy this outbound request and response to the origin server using the specified inbound request.
|
io.reactivex.rxjava3.core.Single<ProxyResponse> |
rxSend(HttpClientRequest inboundRequest)
Send this request to the origin server using the specified inbound request.
|
io.reactivex.rxjava3.core.Single<ProxyResponse> |
send(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(String uri)
Set the request URI to be sent to the origin server.
|
String |
toString() |
io.vertx.core.http.HttpVersion |
version() |
public static final TypeArg<ProxyRequest> __TYPE_ARG
public ProxyRequest(io.vertx.httpproxy.ProxyRequest delegate)
public ProxyRequest(Object delegate)
public io.vertx.httpproxy.ProxyRequest getDelegate()
public static ProxyRequest reverseProxy(HttpServerRequest outboundRequest)
ProxyRequest
instance, the outbound request will be paused.outboundRequest
- the HttpServerRequest
of the user agentpublic io.vertx.core.http.HttpVersion version()
public String absoluteURI()
public io.vertx.core.http.HttpMethod getMethod()
public ProxyRequest setMethod(io.vertx.core.http.HttpMethod method)
The initial HTTP method value is the outbound request HTTP method.
method
- the new HTTP methodpublic String getURI()
public ProxyRequest setURI(String uri)
The initial request URI value is the outbound request URI.
uri
- the new URIpublic Body getBody()
public ProxyRequest setBody(Body body)
The initial request body value is the outbound request body.
body
- the new bodypublic MultiMap headers()
public ProxyRequest bodyFilter(Function<ReadStream<Buffer>,io.reactivex.rxjava3.core.Flowable<Buffer>> filter)
The body filter can rewrite the request body sent to the origin server.
filter
- the filterpublic io.reactivex.rxjava3.core.Completable proxy(HttpClientRequest inboundRequest)
inboundRequest
- the request connected to the origin serverpublic io.reactivex.rxjava3.core.Completable rxProxy(HttpClientRequest inboundRequest)
inboundRequest
- the request connected to the origin serverpublic io.reactivex.rxjava3.core.Single<ProxyResponse> send(HttpClientRequest inboundRequest)
The completionHandler
will be called with the proxy response sent by the origin.
inboundRequest
- the request connected to the origin serverpublic io.reactivex.rxjava3.core.Single<ProxyResponse> rxSend(HttpClientRequest inboundRequest)
The completionHandler
will be called with the proxy response sent by the origin.
inboundRequest
- the request connected to the origin serverpublic ProxyRequest release()
The HTTP server request is resumed, no HTTP server response is sent.
public HttpServerRequest outboundRequest()
public ProxyResponse response()
public static ProxyRequest newInstance(io.vertx.httpproxy.ProxyRequest arg)
Copyright © 2022 Eclipse. All rights reserved.