Skip to main content

forward_request

Function forward_request 

Source
pub async fn forward_request(
    stream: BoxStream,
) -> Result<(ForwardRequest, BoxStream), HttpError>
Expand description

Forward an HTTP request from a client to the target server.

Parses the absolute-form request, converts to origin-form, forwards the request, and returns the response.

§Arguments

  • stream - The client stream

§Returns

The parsed forward request and the target address to connect to.