hjr3 / hyper-timeout

A timeout connector for the hyper client
Other
25 stars 12 forks source link

Update examples to use non-legacy client #26

Open hjr3 opened 11 months ago

hjr3 commented 11 months ago

Now that https://github.com/hjr3/hyper-timeout/pull/25 has landed, we should make an example that uses the non-legacy client.

allan2 commented 11 months ago

There is no higher-level non-legacy client at the moment. Keep as-is until the new one arrives?

Sources: https://github.com/hyperium/hyper/issues/3414 https://hyper.rs/contrib/roadmap/

pronebird commented 9 months ago

Is it not possible to use this crate with hyper::client::conn::http1::handshake(io) ?

hjr3 commented 9 months ago

@pronebird This library wraps HttpConnector, which is part of the legacy package.

If you look at https://hyper.rs/guides/1/client/basic/ you will notice how low level the implementation is. If/when hyper exposes a more high level interface, we can move to that.

What problem(s) are you encountering when using the legacy client?