Package io.vertx.httpproxy
Interface ProxyContext
-
public interface ProxyContextA controller for proxy interception.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HttpClientclient()<T> Tget(String name, Class<T> type)Get a payload attached to this context.booleanisWebSocket()ProxyRequestrequest()ProxyResponseresponse()Future<ProxyResponse>sendRequest()Future<Void>sendResponse()voidset(String name, Object value)Attach a payload to the context.
-
-
-
Method Detail
-
request
ProxyRequest request()
- Returns:
- the proxy request
-
response
ProxyResponse response()
- Returns:
- the proxy response, it might be
nullif the response has not been sent
-
sendRequest
Future<ProxyResponse> sendRequest()
-
isWebSocket
boolean isWebSocket()
- Returns:
- if this request or response is the handshake of WebSocket
-
set
void set(String name, Object value)
Attach a payload to the context.- Parameters:
name- the payload namevalue- any payload value
-
get
<T> T get(String name, Class<T> type)
Get a payload attached to this context.- Parameters:
name- the payload nametype- the expected payload type- Returns:
- the attached payload
-
client
HttpClient client()
- Returns:
- the
HttpClientuse to interact with the origin server
-
-