std.http.BodyWriter
Request or response body.
- Kind
- struct
- Module
std.http
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.http in the Zig reference. This page has 54 cards.
Request or response body.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn chunkedDrain(w: *Writer, data: []const []const u8, splat: usize) Error!usize
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn chunkedSendFile(w: *Writer, file_reader: *File.Reader, limit: std.Io.Limit) Writer.FileError!usize
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn contentLengthDrain(w: *Writer, data: []const []const u8, splat: usize) Error!usize
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn contentLengthSendFile(w: *Writer, file_reader: *File.Reader, limit: std.Io.Limit) Writer.FileError!usize
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn elidingDrain(w: *Writer, data: []const []const u8, splat: usize) Error!usize
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn elidingSendFile(w: *Writer, file_reader: *File.Reader, limit: std.Io.Limit) Writer.FileError!usize
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn end(w: *BodyWriter) Error!void
When using content-length, asserts that the amount of data sent matches the value sent in the header, then flushes `http_protocol_output`.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn endChunked(w: *BodyWriter, options: EndChunkedOptions) Error!void
Writes the end-of-stream message and any optional trailers, flushing the underlying stream.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn endChunkedUnflushed(w: *BodyWriter, options: EndChunkedOptions) Error!void
Writes the end-of-stream message and any optional trailers.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn endUnflushed(w: *BodyWriter) Error!void
When using content-length, asserts that the amount of data sent matches the value sent in the header.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn flush(w: *BodyWriter) Error!void
Sends all buffered data across `BodyWriter.http_protocol_output`.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isEliding(w: *const BodyWriter) bool
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn noneDrain(w: *Writer, data: []const []const u8, splat: usize) Error!usize
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn noneSendFile(w: *Writer, file_reader: *File.Reader, limit: std.Io.Limit) Writer.FileError!usize
Returns `null` if size cannot be computed without making any syscalls.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromString(s: []const u8) ?ContentEncoding
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn minBufferCapacity(ce: ContentEncoding) usize
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(decompress: *Decompress, transfer_reader: *std.Io.Reader, buffer: []u8, content_encoding: ContentEncoding) *std.Io.Reader
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cacheable(m: Method) bool
A cacheable response can be stored to be retrieved and used later, saving a new request to the server. https://developer.mozilla.org/en-US/docs/Glossary/cacheable https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.3.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn idempotent(m: Method) bool
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn requestHasBody(m: Method) bool
Returns true if a request of this method is allowed to have a body Actual behavior from servers may vary and should still be checked.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn responseHasBody(m: Method) bool
Returns true if a response to this method is allowed to have a body Actual behavior from clients may vary and should still be checked.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn safe(m: Method) bool
An HTTP method is safe if it doesn't alter the state of the server. https://developer.mozilla.org/en-US/docs/Glossary/Safe/HTTP https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.1.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn bodyReader(reader: *Reader, transfer_buffer: []u8, transfer_encoding: TransferEncoding, content_length: ?u64) *std.Io.Reader
If compressed body has been negotiated this will return compressed bytes.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn bodyReaderDecompressing(reader: *Reader, transfer_buffer: []u8, transfer_encoding: TransferEncoding, content_length: ?u64, content_encoding: ContentEncoding, decompress: *Decompress, decompress_buffer: []u8) *std.Io.Reader
If compressed body has been negotiated this will return decompressed bytes.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn receiveHead(reader: *Reader) HeadError![]const u8
Buffers the entire head inside `in`.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(integer: u64) RemainingChunkLen
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn int(rcl: RemainingChunkLen) u64
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn class(self: Status) Class
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn phrase(self: Status) ?[]const u8
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
compression is intentionally omitted here since it is handled in `ContentEncoding`.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.httpSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.