type Answer
import ezhttp@0.22.0.0/src/server.bend as Serverimport Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
import ezhttp@0.22.0.0/src/http.bend as Http
24# what a `_with` handler answers: a text body (written as UTF-8), packed
25# octets written unchanged, or a stream of octet chunks from a channel,
26# written chunked until the channel is closed (SPEC.md HTTP-SRV-6, 7)
27type Answer is Type: # noqa: L001 it holds Bytes and a channel; HTTP-SRV-6 to 8 cover its writing
28 TextReply{status: U32, headers: List<&2, Http.Header>, body: String}
29 OctetsReply{status: U32, headers: List<&2, Http.Header>, bytes: Bytes.Bytes}
30 StreamReply{status: U32, headers: List<&2, Http.Header>,
31 chunks: Chan(Bytes.Bytes)}