# Module: vertx-web-common-js/body_codec

### Classes

BodyCodec

### Methods

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

Source:
  - vertx-web-common-js/body_codec.js, line 84

##### 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` | todo | the decode function

Source:
  - vertx-web-common-js/body_codec.js, line 151

##### 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:
  - vertx-web-common-js/body_codec.js, line 124

##### Returns:

a codec for mapping POJO to Json

Type
  BodyCodec

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

Source:
  - vertx-web-common-js/body_codec.js, line 110

##### Returns:

the codec

Type
  BodyCodec

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

Source:
  - vertx-web-common-js/body_codec.js, line 97

##### Returns:

the codec

Type
  BodyCodec

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

Source:
  - vertx-web-common-js/body_codec.js, line 137

##### Returns:

a codec that simply discards the response

Type
  BodyCodec

#### (static) BodyCodec.pipe(stream) → {BodyCodec}

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`stream` | WriteStream | the destination tream

Source:
  - vertx-web-common-js/body_codec.js, line 168

##### 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:
  - vertx-web-common-js/body_codec.js, line 69

##### Returns:

the codec

Type
  BodyCodec