46e94d9425
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] add HttpClient::createForBaseUri()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I've seen ppl use `HttpClient::create()` with default `base_uri` & `auth_bearer`. That's a security risk as the bearer would be sent to any hosts that the client requests.
Instead, ppl should use `ScopingHttpClient`.
The new method should help to discover and use it.
Commits
-------
|
||
---|---|---|
.. | ||
Chunk | ||
DataCollector | ||
DependencyInjection | ||
Exception | ||
Internal | ||
Response | ||
Tests | ||
.gitattributes | ||
.gitignore | ||
CachingHttpClient.php | ||
CHANGELOG.md | ||
composer.json | ||
CurlHttpClient.php | ||
HttpClient.php | ||
HttpClientTrait.php | ||
HttplugClient.php | ||
HttpOptions.php | ||
LICENSE | ||
MockHttpClient.php | ||
NativeHttpClient.php | ||
phpunit.xml.dist | ||
Psr18Client.php | ||
README.md | ||
ScopingHttpClient.php | ||
TraceableHttpClient.php |
HttpClient component
The HttpClient component provides powerful methods to fetch HTTP resources synchronously or asynchronously.