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

A body codec that parse the response as a JSON stream.

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

Arguments

$arg0

JsonParser

Response

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

the body codec for a write stream

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,  $arg1 = null) : \io\vertx\jphp\ext\web\codec\BodyCodec<Void>
static

Same as pipe(stream, true).

param $stream [WriteStream] the destination stream pipe($stream)

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

param $stream [WriteStream] the destination stream param $close [boolean] whether the destination stream should be closed pipe($stream, $close)

Arguments

$arg0

WriteStream

$arg1

boolean

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