danielSanchezQ / warp-reverse-proxy

Fully composable warp filter that can be used as a reverse proxy.
https://github.com/danielSanchezQ/warp-reverse-proxy
MIT License
48 stars 18 forks source link

Feature request: option to customize the reqwest client #44

Closed jtroo closed 3 years ago

jtroo commented 3 years ago

The warp-reverse-proxy library uses reqwest behind the scenes but it is currently not possible to customize the reqwest client configuration.

There are some use cases where client configs other than the default are needed, so it would be good provide this functionality.

danielSanchezQ commented 3 years ago

@jtroo, would you mind check if #45 would suit your needs? You can check some tiny example in the README. Any other suggestion is welcome :)

jtroo commented 3 years ago

Gave it a try, looks good to me!

jtroo commented 3 years ago

One potential improvement regarding the test would be that you could force serialized testing in the Rust code, so that anyone running cargo test without forcing a single thread of execution via the arguments can get a consistent result.

The crate I personally use for this is serial_test.

danielSanchezQ commented 3 years ago

Nice to know about serial. But tests should be consistent anyway now. I didn't enforced the single thread in the end even if the commit, indeed, exists. Thanks for your feedback!

danielSanchezQ commented 3 years ago

Implemented in #45