flush
Sends all buffered data across BodyWriter.http_protocol_output.
Function parameters
Parameters
- w:*BodyWriter
Type definitions in this namespace
Types
- Method
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
- Status
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
- TransferEncoding
- compression is intentionally omitted here since it is handled in `ContentEncoding`.
- BodyWriter
- Request or response body.
Source
Implementation
pub fn flush(w: *BodyWriter) Error!void {
const out = w.http_protocol_output;
switch (w.state) {
.end, .none, .content_length, .chunk_len => return out.flush(),
}
}