Function kvarn::prelude::fs::read::request

source ·
pub async fn request<R>(
    stream: impl DerefMut<Target = R>,
    max_len: usize,
    default_host: Option<&[u8]>,
    scheme: &str,
    timeout: Duration
) -> impl Future<Output = Result<(Request<()>, Bytes), Error>>where
    R: AsyncRead + Unpin,
Expand description

Try to parse a request from stream

Errors

Will return error if building the http::Response internally failed, if path is empty, or any errors which occurs while reading from stream. See Error for all vairants.

Limitations

Request will be cut off at max_len.