Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

reader

Public Function
std.http.Client.Response.reader
pub fn reader(response: *Response, transfer_buffer: []u8) *Reader

If compressed body has been negotiated this will return compressed bytes.

If the returned Reader returns error.ReadFailed the error is available via bodyErr.

Asserts that this function is only called once.

See also:

Params

  • response: *Response
  • transfer_buffer: []u8

File

http/Client.zig:731
731
732
733
734
735
736
737
    pub fn reader(response: *Response, transfer_buffer: []u8) *Reader {
        response.head.invalidateStrings();
        const req = response.request;
        if (!req.method.responseHasBody()) return .ending;
        const head = &response.head;
        return req.reader.bodyReader(transfer_buffer, head.transfer_encoding, head.content_length);
    }