http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.45k stars 119 forks source link

client: make with_http_client() generic #238

Closed Fishrock123 closed 3 years ago

Fishrock123 commented 3 years ago

This avoids leaking out the storage underneath.

Internally we require a function like the original though, due to very confusing & indirect lifetime requirements.

I didn't like the api here to begin with, so this seems very reasonable to get in to 2.0