pub fn reader(response: *Response, transfer_buffer: []u8) *Reader response: *Responsetransfer_buffer: []u8731
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);
}
If compressed body has been negotiated this will return compressed bytes.
If the returned
Readerreturnserror.ReadFailedthe error is available viabodyErr.Asserts that this function is only called once.
See also:
readerDecompressing