Function http_connect
pub async fn http_connect<IO, Input, BodyConnection>(
io: IO,
input: Input,
exec: Executor,
) -> Result<EstablishedClientConnection<HttpClientService<BodyConnection>, Input>, OpaqueError>where
IO: Io + Unpin + ExtensionsRef,
Input: AuthorityInputExt + ExtensionsRef + HttpVersionInputExt + TargetHttpVersionInputExt + Send + 'static,
BodyConnection: Body + Unpin + Send + 'static,
<BodyConnection as Body>::Data: Send + 'static,
<BodyConnection as Body>::Error: Into<Box<dyn Error + Send + Sync>>,Available on crate features
dns and http-backend and http and std and tcp only.Expand description
Establish an HTTP connection on the pre-established IO (bytes) stream.
The input is returned unchanged and only needs to expose the target HTTP
version, authority and connection-scoped extensions. It does not need to be
an HTTP request and may instead be a protocol-independent connection input
such as rama_net::client::ConnectRequest.
The spawned HTTP connection span is connection-scoped and can serve many requests, so request fields such as method, URI and user agent belong on request spans rather than this connection span.