Skip to main content

peek_http_input

Function peek_http_input 

pub async fn peek_http_input<PeekableInput>(
    input: PeekableInput,
    timeout: Option<Duration>,
) -> Result<(Option<HttpPeekVersion>, <PeekableInput as PeekIoProvider>::Mapped<PrefixedIo<ReplayReader, <PeekableInput as PeekIoProvider>::PeekIo>>), Box<dyn Error + Sync + Send>>
where PeekableInput: PeekIoProvider, <PeekableInput as PeekIoProvider>::PeekIo: Unpin,
Available on crate feature net only.
Expand description

Detect HTTP using HttpPeekConfig::default and return an input that replays every byte consumed during detection.