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.




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


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).