hyper-client-io-wizard

Crates.iohyper-client-io-wizard
lib.rshyper-client-io-wizard
version0.1.8
sourcesrc
created_at2023-12-17 23:35:19.100978
updated_at2024-04-17 17:44:51.703995
descriptionClient IO builder for hyper-1
homepagehttps://github.com/swizard0/hyper-client-io-wizard
repositoryhttps://github.com/swizard0/hyper-client-io-wizard
max_upload_size
id1072824
size39,019
wkt-publishers (github:georust:wkt-publishers)

documentation

https://docs.rs/hyper-client-io-wizard

README

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.

Commit count: 28

cargo fmt