7 releases

new 0.1.8 Apr 17, 2024
0.1.7 Dec 21, 2023

#146 in HTTP client

Download history 12/week @ 2024-02-26 2/week @ 2024-03-11 36/week @ 2024-04-01 139/week @ 2024-04-15

175 downloads per month

MIT license

39KB
938 lines

hyper-client-io-wizard

Documentation | Crates.io | Repository

Why hyper-client-io-wizard?

This project's goal is to provide a simple and straightforward connection builder for hyper v1 HTTP client hyper::client::conn.

Features

Currently supports following configurations:

Usage

See the examples folder in the repository for more examples, i.e. primitive-curl command line utility.

    let io = Io::resolver_setup()
        .system()
        .connection_setup(target_uri)?
        .connect_timeout(Some(Duration::from_millis(1000)))
        .socks5_proxy_setup(proxy_uri)
        .tls_setup()
        .await?
        .native_roots()?
        .enable_all_versions()
        .establish()
        .await?;

    let (mut request_sender, connection) = conn::http2::Builder::new(TokioExecutor::new())
        .handshake(io.stream)
        .await?;
    tokio::spawn(connection);
    let response = request_sender.send_request(request).await?;

    ...

License

This project is licensed under MIT.

Dependencies

~19–31MB
~553K SLoC