8000 [HttpClient] Remove mentions to RequestFactory · symfony/symfony-docs@fe05ab0 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe05ab0

Browse files
committed
[HttpClient] Remove mentions to RequestFactory
1 parent 0d071ee commit fe05ab0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

http_client.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,26 +1503,24 @@ Let's say you want to instantiate a class with the following constructor,
15031503
that requires HTTPlug dependencies::
15041504

15051505
use Http\Client\HttpClient;
1506-
use Http\Message\RequestFactory;
15071506
use Http\Message\StreamFactory;
15081507

15091508
class SomeSdk
15101509
{
15111510
public function __construct(
15121511
HttpClient $httpClient,
1513-
RequestFactory $requestFactory,
15141512
StreamFactory $streamFactory
15151513
)
15161514
// [...]
15171515
}
15181516

1519-
Because :class:`Symfony\\Component\\HttpClient\\HttplugClient` implements the
1520-
three interfaces, you can use it this way::
1517+
Because :class:`Symfony\\Component\\HttpClient\\HttplugClient` implements these
1518+
interfaces,you can use it this way::
15211519

15221520
use Symfony\Component\HttpClient\HttplugClient;
15231521

15241522
$httpClient = new HttplugClient();
1525-
$apiClient = new SomeSdk($httpClient, $httpClient, $httpClient);
1523+
$apiClient = new SomeSdk($httpClient, $httpClient);
15261524

15271525
If you'd like to work with promises, :class:`Symfony\\Component\\HttpClient\\HttplugClient`
15281526
also implements the ``HttpAsyncClient`` interface. To use it, you need to install the

0 commit comments

Comments
 (0)
0