Represents a client-side HTTP response.
Vert.x provides you with one of these via the handler that was provided when creating the @see \io\vertx\jphp\core\http\HttpClientRequest or that was set on the @see \io\vertx\jphp\core\http\HttpClientRequest instance.
It implements @see \io\vertx\jphp\core\streams\ReadStream so it can be used with
see |
to pump data with flow control. |
---|---|
package |
Default |
__construct()
bodyHandler( $arg0) : $this
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.
callable
$this
customFrameHandler( $arg0) : $this
callable
$this
a reference to this, so the API can be used fluently
endHandler( $arg0) : $this
callable
$this
exceptionHandler( $arg0) : $this
callable
$this
fetch( $arg0) : $this
integer
$this
getHeader( $arg0) : string
string
string
the header value
getTrailer( $arg0) : string
string
string
the trailer value
handler( $arg0) : $this
callable
$this
netSocket() : \io\vertx\jphp\core\net\NetSocket
USE THIS WITH CAUTION! Writing to the socket directly if you don't know what you're doing can easily break the HTTP protocol.
HTTP/1.1 pipe-lined requests cannot support net socket upgrade.
One valid use-case for calling this is to receive the @see \io\vertx\jphp\core\net\NetSocket after a HTTP CONNECT was issued to the remote peer and it responded with a status code of 200.
\io\vertx\jphp\core\net\NetSocket
the net socket
pause() : $this
$this
request() : \io\vertx\jphp\core\http\HttpClientRequest
resume() : $this
$this
statusCode() : integer
integer
the status code of the response
statusMessage() : string
string
the status message of the response
streamPriorityHandler( $arg0) : $this
This is not implemented for HTTP/1.x.
callable
$this
trailers() : \io\vertx\jphp\core\MultiMap
version() : string
string
the version of the response