An HTTP response.
The usual HTTP response attributes are available:
The body of the response is returned by @see \io\vertx\jphp\ext\web\client\HttpResponse::body decoded as the format specified by the @see \io\vertx\jphp\ext\web\codec\BodyCodec that built the response.
Keep in mind that using this HttpResponse impose to fully buffer the response body and should be used for payload
that can fit in memory.
| package |
Default |
|---|
__construct()
body() : mixed
mixedthe response body in the format it was decoded.
bodyAsBuffer() : \io\vertx\jphp\core\buffer\Buffer
\io\vertx\jphp\core\buffer\Bufferthe response body decoded as a {@link Buffer}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
bodyAsJson( $arg0) : mixed
string
mixedthe response body decoded as the specified {@code type} with the Jackson mapper, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
bodyAsJsonArray() : array
arraythe response body decoded as a {@link JsonArray}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
bodyAsJsonObject() : array
arraythe response body decoded as {@link JsonObject}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
bodyAsString( $arg0 = null) : string
param $encoding [string] bodyAsString($encoding)
string
stringthe response body decoded as a {@code String}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
getHeader( $arg0) : string
string
stringthe header value
getTrailer( $arg0) : string
string
stringthe trailer value
statusCode() : integer
integerthe status code of the response
statusMessage() : string
stringthe status message of the response
trailers() : \io\vertx\jphp\core\MultiMap
version() : string
stringthe version of the response