BodyCodec

A codec for encoding and decoding HTTP bodies.

package

Default

Methods

__construct

__construct() 

buffer

buffer() : \io\vertx\jphp\ext\web\codec\BodyCodec<Buffer>
static

Response

\io\vertx\jphp\ext\web\codec\BodyCodec

the {@link Buffer} codec

Create a codec that buffers the entire body and then apply the <code>decode</code> function and returns the result.

create( $arg0) : \io\vertx\jphp\ext\web\codec\BodyCodec<T>
static

Arguments

$arg0

callable

Response

\io\vertx\jphp\ext\web\codec\BodyCodec

the created codec

Create and return a codec for Java objects encoded using Jackson mapper.

json( $arg0) : \io\vertx\jphp\ext\web\codec\BodyCodec<U>
static

Arguments

$arg0

string

Response

\io\vertx\jphp\ext\web\codec\BodyCodec

a codec for mapping POJO to Json

jsonArray

jsonArray() : \io\vertx\jphp\ext\web\codec\BodyCodec<JsonArray>
static

Response

\io\vertx\jphp\ext\web\codec\BodyCodec

the {@link JsonArray} codec

jsonObject

jsonObject() : \io\vertx\jphp\ext\web\codec\BodyCodec<JsonObject>
static

Response

\io\vertx\jphp\ext\web\codec\BodyCodec

the {@link JsonObject} codec

none

none() : \io\vertx\jphp\ext\web\codec\BodyCodec<Void>
static

Response

\io\vertx\jphp\ext\web\codec\BodyCodec

a codec that simply discards the response

A body codec that pipes the body to a write stream.

pipe( $arg0) : \io\vertx\jphp\ext\web\codec\BodyCodec<Void>
static

Arguments

$arg0

WriteStream

Response

\io\vertx\jphp\ext\web\codec\BodyCodec

the body codec for a write stream

<b> string() </b>

string( $arg0 = null) : \io\vertx\jphp\ext\web\codec\BodyCodec<String>
static

A codec for strings using a specific encoding.

param $encoding [string] the encoding string($encoding)

Arguments

$arg0

string

Response

\io\vertx\jphp\ext\web\codec\BodyCodec

the UTF-8 string codec