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
mixed
the response body in the format it was decoded.
bodyAsBuffer() : \io\vertx\jphp\core\buffer\Buffer
\io\vertx\jphp\core\buffer\Buffer
the response body decoded as a {@link Buffer}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
bodyAsJson( $arg0) : mixed
string
mixed
the 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
array
the response body decoded as a {@link JsonArray}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
bodyAsJsonObject() : array
array
the 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
string
the response body decoded as a {@code String}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
getHeader( $arg0) : string
string
string
the header value
getTrailer( $arg0) : string
string
string
the trailer value
statusCode() : integer
integer
the status code of the response
statusMessage() : string
string
the status message of the response
trailers() : \io\vertx\jphp\core\MultiMap
version() : string
string
the version of the response