Skip to main content

read_http_head

Function read_http_head 

Source
pub async fn read_http_head<R: AsyncRead + Unpin>(
    stream: &mut R,
) -> Result<Vec<u8>>
Expand description

Read from a TCP stream until we have the full HTTP header block. Returns the buffered bytes (headers + any body bytes already received).