structstd.http.Server.Request.RespondStreamingOptions[src]

Fields

send_buffer: []u8

An externally managed slice of memory used to batch bytes before sending. respondStreaming asserts this is large enough to store the full HTTP response head.

Must outlive the returned Response.

content_length: ?u64 = null

If provided, the response will use the content-length header; otherwise it will use transfer-encoding: chunked.

respond_options: RespondOptions = .{}

Options that are shared with the respond method.

Source Code

Source code
pub const RespondStreamingOptions = struct {
    /// An externally managed slice of memory used to batch bytes before
    /// sending. `respondStreaming` asserts this is large enough to store
    /// the full HTTP response head.
    ///
    /// Must outlive the returned Response.
    send_buffer: []u8,
    /// If provided, the response will use the content-length header;
    /// otherwise it will use transfer-encoding: chunked.
    content_length: ?u64 = null,
    /// Options that are shared with the `respond` method.
    respond_options: RespondOptions = .{},
}