Module: vertx-web-common-js/body_codec

Classes

BodyCodec

Methods

(static) BodyCodec.buffer() → {BodyCodec}

Source:
Returns:
the codec
Type
BodyCodec

(static) BodyCodec.create(decode) → {BodyCodec}

Create a codec that buffers the entire body and then apply the decode function and returns the result.
Parameters:
Name Type Description
decode function the decode function
Source:
Returns:
the created codec
Type
BodyCodec

(static) BodyCodec.json(type) → {BodyCodec}

Create and return a codec for Java objects encoded using Jackson mapper.
Parameters:
Name Type Description
type todo
Source:
Returns:
a codec for mapping POJO to Json
Type
BodyCodec

(static) BodyCodec.jsonArray() → {BodyCodec}

Source:
Returns:
the codec
Type
BodyCodec

(static) BodyCodec.jsonObject() → {BodyCodec}

Source:
Returns:
the codec
Type
BodyCodec

(static) BodyCodec.jsonStream(parser) → {BodyCodec}

A body codec that parse the response as a JSON stream.
Parameters:
Name Type Description
parser JsonParser the non-null JSON parser to emits the JSON object. The parser must be configured for the stream. Not e that you need to keep a reference on the parser to retrieved the JSON events.
Source:
Returns:
the body codec for a write stream
Type
BodyCodec

(static) BodyCodec.none() → {BodyCodec}

Source:
Returns:
a codec that simply discards the response
Type
BodyCodec

(static) BodyCodec.pipe(stream, close) → {BodyCodec}

A body codec that pipes the body to a write stream.
Parameters:
Name Type Description
stream WriteStream the destination stream
close boolean whether the destination stream should be closed
Source:
Returns:
the body codec for a write stream
Type
BodyCodec

(static) BodyCodec.string(encoding) → {BodyCodec}

A codec for strings using a specific encoding.
Parameters:
Name Type Description
encoding string the encoding
Source:
Returns:
the codec
Type
BodyCodec