Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eda7344

Browse filesBrowse files
author
Simon Berger
committed
Replace interface use HttpClient by HttpAsyncClient
1 parent 5bde334 commit eda7344
Copy full SHA for eda7344

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed

‎http_client.rst

Copy file name to clipboardExpand all lines: http_client.rst
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,14 +1582,14 @@ interoperable with libraries that require it thanks to the
15821582
Let's say you want to instantiate a class with the following constructor,
15831583
that requires HTTPlug dependencies::
15841584

1585-
use Http\Client\HttpClient;
1585+
use Http\Client\HttpAsyncClient;
15861586
use Http\Message\RequestFactory;
15871587
use Http\Message\StreamFactory;
15881588

15891589
class SomeSdk
15901590
{
15911591
public function __construct(
1592-
HttpClient $httpClient,
1592+
HttpAsyncClient $httpClient,
15931593
RequestFactory $requestFactory,
15941594
StreamFactory $streamFactory
15951595
)
@@ -1603,8 +1603,7 @@ Because ``HttplugClient`` implements the three interfaces, you can use it this w
16031603
$httpClient = new HttplugClient();
16041604
$apiClient = new SomeSdk($httpClient, $httpClient, $httpClient);
16051605

1606-
If you'd like to work with promises, ``HttplugClient`` also implements the
1607-
``HttpAsyncClient`` interface. To use it, you need to install the
1606+
To use it, you need to install the
16081607
``guzzlehttp/promises`` package:
16091608

16101609
.. code-block:: terminal

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.