Function reader [src]
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:
readerDecompressing
Prototype
pub fn reader(response: *Response, transfer_buffer: []u8) *Reader Parameters
response: *Responsetransfer_buffer: []u8 Source
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);
}