This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/HttpClient
Nicolas Grekas 46e94d9425 feature #33973 [HttpClient] add HttpClient::createForBaseUri() (nicolas-grekas)
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
-------

1aa9a118d6 [HttpClient] add HttpClient::createForBaseUri()
2019-10-14 16:15:04 +02:00
..
Chunk [HttpClient] fix support for 103 Early Hints and other informational status codes 2019-09-03 23:21:26 +02:00
DataCollector [HttpClient] fix undefined index access 2019-09-24 20:17:30 +02:00
DependencyInjection [HttpClient] Added TraceableHttpClient and WebProfiler panel 2019-08-23 19:16:53 +02:00
Exception removed @experimental annotations 2019-06-29 18:43:50 +02:00
Internal [HttpClient] resolve promise chains on HttplugClient::wait() 2019-10-12 10:50:39 +02:00
Response [HttpClient] resolve promise chains on HttplugClient::wait() 2019-10-12 10:50:39 +02:00
Tests [HttpClient] resolve promise chains on HttplugClient::wait() 2019-10-12 10:50:39 +02:00
.gitattributes Adding .gitattributes to remove Tests directory from "dist" 2019-09-16 10:12:51 +02:00
.gitignore [HttpClient] Add .gitignore file 2019-09-16 14:30:38 +02:00
CachingHttpClient.php Merge branch '4.3' into 4.4 2019-10-07 14:37:47 +02:00
CHANGELOG.md [HttpClient] add HttpClient::createForBaseUri() 2019-10-13 19:52:56 +02:00
composer.json [HttpClient] Async HTTPlug client 2019-10-07 13:21:57 +02:00
CurlHttpClient.php Merge branch '4.3' into 4.4 2019-10-10 09:38:51 +02:00
HttpClient.php [HttpClient] add HttpClient::createForBaseUri() 2019-10-13 19:52:56 +02:00
HttpClientTrait.php Merge branch '4.3' into 4.4 2019-10-14 14:27:06 +02:00
HttplugClient.php [HttpClient] try using php-http/discovery when nyholm/psr7 is not installed 2019-10-14 12:53:45 +02:00
HttpOptions.php removed @experimental annotations 2019-06-29 18:43:50 +02:00
LICENSE [HttpClient] introduce the component 2019-03-07 17:16:39 +01:00
MockHttpClient.php fixed CS 2019-06-13 13:03:18 +02:00
NativeHttpClient.php Merge branch '4.3' into 4.4 2019-10-04 23:43:27 +02:00
phpunit.xml.dist [HttpClient] introduce the component 2019-03-07 17:16:39 +01:00
Psr18Client.php [HttpClient] try using php-http/discovery when nyholm/psr7 is not installed 2019-10-14 12:53:45 +02:00
README.md Remove experimental notice from components 2019-07-11 11:03:49 +02:00
ScopingHttpClient.php removed @experimental annotations 2019-06-29 18:43:50 +02:00
TraceableHttpClient.php [HttpClient] Added TraceableHttpClient and WebProfiler panel 2019-08-23 19:16:53 +02:00

HttpClient component

The HttpClient component provides powerful methods to fetch HTTP resources synchronously or asynchronously.

Resources