Function relay_sized_stream

Source
pub async fn relay_sized_stream<I, O>(
    input: &mut I,
    output: &mut O,
    length: usize,
) -> Result<usize, Error>
where I: Read + Unpin, O: Write + Unpin,
Expand description

Streams body data of known size from input to output. An exact body length (e.g. Content-Length header) must be provided for this transfer type.

The method expects that the input holds only body data. This means that we have to read input protocol headers before we call this method.