enum HTTP::ResponseBody

The body of a Response. The server adds the framing it implies: Content-Length for all but ResponseBody::Stream, which is sent chunked.

<std:http>:907

Variants

variant HTTP::ResponseBody::Empty

No body.

<std:http>:909

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

A text body, sent as UTF-8.

<std:http>:911

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

A binary body.

<std:http>:913

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

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

<std:http>:916