[][src]Function hreq_h1::client::handshake

pub fn handshake<S>(io: S) -> (SendRequest, Connection<S>) where
    S: AsyncRead + AsyncWrite + Unpin

Creates a new HTTP/1 client backed by some async io connection.

Returns a handle to send requests and a connection tuple. The connection is a future that must be polled to "drive" the client forward.

See module level doc for an example.