pub fn http_response_read_body(
request_id: <PassAs<HttpRequestId, u16> as RIType>::Inner,
buffer: <PassFatPointerAndReadWrite<&mut [u8]> as RIType>::Inner,
deadline: <PassFatPointerAndDecode<Option<Timestamp>> as RIType>::Inner,
) -> <AllocateAndReturnByCodec<Result<u32, HttpError>> as RIType>::Inner
Expand description
Read a chunk of body response to given buffer.
Returns the number of bytes written or an error in case a deadline
is reached or server closed the connection.
If 0
is returned it means that the response has been fully consumed
and the request_id
is now invalid.
NOTE: this implies that response headers must be read before draining the body.
Passing None
as a deadline blocks forever.