encodeResponseHead function
The head of response as bytes, framed by framing, for an adapter
that writes it from its own buffer.
Implementation
Uint8List encodeResponseHead(Response response, ResponseFraming framing) {
final head = ResponseHead(response, framing);
final out = Uint8List(head.bound);
return Uint8List.sublistView(out, 0, head.writeTo(out));
}