ResponseFraming class final

What goes on the wire for a Response, decided once so every adapter frames the same bytes for the same response.

An adapter writes the response's headers except HeaderName.contentLength, HeaderName.contentType and HeaderName.transferEncoding, then what is here. The body decides the length and the type, the server the date.

Constructors

ResponseFraming.of(Response response, {required bool head, required HttpProtocol protocol, required bool keepAlive, bool stampDate = false})
The framing of response over protocol, for a HEAD request when head, on a connection kept alive when keepAlive.
factory

Properties

chunked → bool
Whether the body goes out in chunked coding.
no setter
closeAfter → bool
Whether the connection closes after this response.
final
contentLength → int?
The Content-Length to announce, or null.
final
contentType → String?
The Content-Type from the body, or null for a body without one.
final
date → String?
The Date to add, or null when the response has one.
final
dateLine → Uint8List?
The Date field line, date: <value>\r\n, as bytes for a head writer to copy, or null when date is null or the stand-in an adapter stamps.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sendBody → bool
Whether body bytes follow the head.
final
transferEncoding → List<String>?
The Transfer-Encoding codings to announce, or null.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

isFramingHeader(HeaderName name) → bool
Whether the framing, not the headers, supplies name.