@@ -12,25 +12,24 @@ To install the cURL client, run:
1212
1313 $ composer require php-http/curl-client
1414
15- Usage
16- -----
17-
18- The cURL client needs a :ref: `message <message-factory >` and a :ref: `stream <stream-factory >`
19- factory in order to to work::
15+ .. include :: includes/install-message-factory.inc
2016
21- use Http\Client\Curl\Client;
17+ .. include :: includes/install-discovery.inc
2218
23- $client = new Client($messageFactory, $streamFactory);
19+ Usage
20+ -----
2421
25- Using `php-http/message <https://packagist.org/packages/php-http/message >`_::
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::
2625
2726 use Http\Client\Curl\Client;
2827 use Http\Message\MessageFactory\DiactorosMessageFactory;
2928 use Http\Message\StreamFactory\DiactorosStreamFactory;
3029
3130 $client = new Client(new DiactorosMessageFactory(), new DiactorosStreamFactory());
3231
33- Using ` php-http/discovery < https://packagist.org/packages/php-http/ discovery>`_ ::
32+ Or you can use :doc: ` ../ discovery` ::
3433
3534 use Http\Client\Curl\Client;
3635 use Http\Discovery\MessageFactoryDiscovery;
@@ -53,7 +52,8 @@ You can use `cURL options <http://php.net/curl_setopt>`_ to configure Client::
5352 ];
5453 $client = new Client(MessageFactoryDiscovery::find(), StreamFactoryDiscovery::find(), $options);
5554
56- These options cannot be used (will be overwritten by Client):
55+ The following options can not be changed in the set up. Most of them are to be provided with the
56+ request instead:
5757
5858 * CURLOPT_CUSTOMREQUEST
5959 * CURLOPT_FOLLOWLOCATION
0 commit comments