amphp / http-client

An advanced async HTTP client library for PHP, enabling efficient, non-blocking, and concurrent requests and responses.
https://amphp.org/http-client
MIT License
707 stars 66 forks source link

Add HttpClientBuilder::with/withoutHeaderIfUnset() #238

Closed nicolas-grekas closed 4 years ago

nicolas-grekas commented 4 years ago

Useful when we want to disable the default interceptors, as in https://github.com/symfony/symfony/pull/35115#pullrequestreview-337184875

nicolas-grekas commented 4 years ago

I think these should be separate functions to opt-out of any of these

updated

kelunik commented 4 years ago

I've implemented it slightly differently in #241, what do you think?

nicolas-grekas commented 4 years ago

Works for me thanks!