Class HttpResponseEncoder

All Implemented Interfaces:
Codec, Encoder<HttpResponse,HttpRequest>

An encoder for HTTP responses.

It accepts a header and optional payload data end encodes it into a sequence of Buffers.

HttpResponseEncoder

Headers

Date

The encoder automatically adds a Date header as specified in RFC 7231, Section 7.1.1.2. Any existing Date header will be overwritten.

Expires

If the protocol is HTTP 1.0 and the response includes a Cache-Control header field with a max-age directive, an Expires header field with the same information is generated (see RFC 7234, Section 5.3).