@@ -12,30 +12,26 @@ To install the cURL client, run:
1212
1313 $ composer require php-http/curl-client
1414
15- .. include :: includes/install-message-factory.inc
16-
17- .. include :: includes/install-discovery.inc
18-
1915 Usage
2016-----
2117
22- The cURL client needs a :ref: `message factory <message-factory >` and a
23- :ref: `stream factory <stream-factory >` in order to to work. You can either specify the factory
24- explicitly::
18+ The cURL client needs a PSR-17 message factory and stream factory to work.
19+ You can either specify the factory explicitly::
2520
2621 use Http\Client\Curl\Client;
2722 use Http\Message\MessageFactory\DiactorosMessageFactory;
2823 use Http\Message\StreamFactory\DiactorosStreamFactory;
2924
3025 $client = new Client(new DiactorosMessageFactory(), new DiactorosStreamFactory());
3126
32- Or you can use :doc: `../discovery `::
27+ Or you can omit the parameters and let the client use :doc: `../discovery ` to
28+ determine a suitable factory::
3329
3430 use Http\Client\Curl\Client;
3531 use Http\Discovery\MessageFactoryDiscovery;
3632 use Http\Discovery\StreamFactoryDiscovery;
3733
38- $client = new Client(MessageFactoryDiscovery::find(), StreamFactoryDiscovery::find() );
34+ $client = new Client();
3935
4036Configuring Client
4137------------------
@@ -49,7 +45,7 @@ You can use `cURL options <http://php.net/curl_setopt>`_ to configure Client::
4945 $options = [
5046 CURLOPT_CONNECTTIMEOUT => 10, // The number of seconds to wait while trying to connect.
5147 ];
52- $client = new Client(MessageFactoryDiscovery::find(), StreamFactoryDiscovery::find() , $options);
48+ $client = new Client(null, null , $options);
5349
5450The following options can not be changed in the set up. Most of them are to be provided with the
5551request instead:
@@ -65,4 +61,4 @@ request instead:
6561 * CURLOPT_URL
6662 * CURLOPT_USERPWD
6763
68- .. include :: includes/further-reading-sync .inc
64+ .. include :: includes/further-reading-async .inc
0 commit comments