public interface HttpClientResponse extends ReadStream<HttpClientResponse>
An instance is provided to the user via a Handler
instance that was specified when one of the HTTP method operations, or the
generic HttpClient.request(String, String, org.vertx.java.core.Handler)
method was called on an instance of HttpClient
.
It implements ReadStream
so it can be used with
Pump
to pump data with flow control.
Instances of this class are not thread-safe.
Modifier and Type | Method and Description |
---|---|
HttpClientResponse |
bodyHandler(Handler<Buffer> bodyHandler)
Convenience method for receiving the entire request body in one piece.
|
java.util.List<java.lang.String> |
cookies() |
MultiMap |
headers() |
NetSocket |
netSocket()
Get a net socket for the underlying connection of this request.
|
int |
statusCode()
The HTTP status code of the response
|
java.lang.String |
statusMessage()
The HTTP status message of the response
|
MultiMap |
trailers() |
endHandler
dataHandler, pause, resume
exceptionHandler
int statusCode()
java.lang.String statusMessage()
MultiMap headers()
MultiMap trailers()
java.util.List<java.lang.String> cookies()
HttpClientResponse bodyHandler(Handler<Buffer> bodyHandler)
bodyHandler
- This handler will be called after all the body has been receivedNetSocket netSocket()
NetSocket
after a HTTP CONNECT was issued to the
remote peer and it responded with a status code of 200.