interface HttpClientResponse : ReadStream<Buffer>
Represents a client-side HTTP response.
Vert.x provides you with one of these via the handler that was provided when creating the io.vertx.core.http.HttpClientRequest or that was set on the io.vertx.core.http.HttpClientRequest instance.
It implements io.vertx.core.streams.ReadStream so it can be used with io.vertx.core.streams.Pump to pump data with flow control.
Author
Tim Fox
abstract fun bodyHandler(bodyHandler: Handler<Buffer>): HttpClientResponse
Convenience method for receiving the entire request body in one piece. This saves you having to manually set a dataHandler and an endHandler and append the chunks of the body until the whole body received. Don't use this if your request body is large - you could potentially run out of RAM. |
|
abstract fun cookies(): MutableList<String> |
|
abstract fun customFrameHandler(handler: Handler<HttpFrame>): HttpClientResponse
Set an custom frame handler. The handler will get notified when the http stream receives an custom HTTP/2 frame. HTTP/2 permits extension of the protocol. |
|
abstract fun endHandler(endHandler: Handler<Void>): HttpClientResponse |
|
abstract fun exceptionHandler(handler: Handler<Throwable>): HttpClientResponse |
|
abstract fun getHeader(headerName: String): Stringabstract fun getHeader(headerName: CharSequence): String
Return the first header value with the specified name |
|
abstract fun getTrailer(trailerName: String): String
Return the first trailer value with the specified name |
|
abstract fun handler(handler: Handler<Buffer>): HttpClientResponse |
|
abstract fun headers(): MultiMap |
|
abstract fun netSocket(): NetSocket
Get a net socket for the underlying connection of this request. USE THIS WITH CAUTION! Writing to the socket directly if you don't know what you're doing can easily break the HTTP protocol One valid use-case for calling this is to receive the io.vertx.core.net.NetSocket after a HTTP CONNECT was issued to the remote peer and it responded with a status code of 200. |
|
abstract fun pause(): HttpClientResponse |
|
abstract fun request(): HttpClientRequest |
|
abstract fun resume(): HttpClientResponse |
|
abstract fun statusCode(): Int |
|
abstract fun statusMessage(): String |
|
abstract fun trailers(): MultiMap |
|
abstract fun version(): HttpVersion |