Skip to documentation
SLOP

tiny.http.ClientResponse

Reference tiny.http ClientResponse

Defined in tiny.http.

API (7)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callstiny.httpClientResponse
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/http/src/client/response.zig:93

zig
pub const ClientResponse = struct {    status: u16,    headers: []const Header,    body: []const u8,    connection_reusable: bool,    pub fn header(self: ClientResponse, name: []const u8) ?[]const u8 {        for (self.headers) |item| {            if (std.ascii.eqlIgnoreCase(item.name, name)) return item.value;        }        return null;    }    /// Parses one complete response out of `data` and copies its bytes into    /// `scratch` . The returned headers and body are slices of `scratch` , so they    /// stay valid until that scratch is parsed into again. A chunked body is    /// decoded in place inside the body region, over the chunk framing already    /// written there. Capacity is checked before any byte is copied, so a scratch    /// too small for the headers, the head, or the body returns an error and    /// publishes nothing. A caller can enlarge the scratch and call again.    pub fn parse(scratch: Scratch, data: []const u8) Error!ClientResponse {        return parseWithMethod(scratch, data, null);    }    pub fn parseForMethod(scratch: Scratch, data: []const u8, method: []const u8) Error!ClientResponse {        return parseWithMethod(scratch, data, method);    }};

Source: lib/http/src/root.zig:94

zig
pub const ClientResponse = client.ClientResponse;
Called byCallstest sourcelib.http.src.client.responsetest: Client response capacity failur...test sourcelib.http.src.client.responsetest: Client response parsing accepts...test sourcelib.http.src.client.responsetest: Client response parsing preserv...test sourcelib.http.src.client.responsetest: Client response semantic failur...test sourcelib.http.src.client.runtime.test_ClientResponseparse: 401 with JSON body+9 moreprivate sourcelib.http.src.client.responseparseWithMethodClientResponseparse
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.http.src.client.responsetest: Client response parsing preserv...test sourcelib.http.src.client.responsetest: Client response parsing retains...test sourcelib.http.src.client.runtime.test_ClientResponseparseForMethod: HEAD preserves header...private sourcelib.http.src.client.responseparseWithMethodClientResponseparseForMethod
Static calls · unresolved targets: 0 · external targets: 0.

Complete caller list for ClientResponse.parse

14 direct callers.

Audit

Definitions4
Public names4
Members4
Version26.7.0
Revisiondaab053ee433