enum HTTP::Content

A body to send: a Server::Response's or a Client::Request's. The sender adds the framing it implies: Content-Length for all but Content::Stream, which is sent chunked.

<std:http>:870

Variants

variant HTTP::Content::Empty

No body.

<std:http>:872

variant HTTP::Content::Text(text: String)

A text body, sent as UTF-8.

<std:http>:874

variant HTTP::Content::Binary(bytes: Bytes)

A binary body.

<std:http>:876

variant HTTP::Content::Stream(write: shareable (HTTP::BodyWriter) -> Void)

A body the procedure writes, chunk by chunk, after the headers have gone out (a server does not run it for HEAD or 304).

<std:http>:879