File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ You can then invoke the multi request client - the `MultiResponseHandlerInterfac
130
130
` HTTPOptions ` and ` LoggerInterface ` are optional:
131
131
132
132
``` php
133
- $options = new HTTPOptions;
133
+ $options = new HTTPOptions;
134
134
$options->ca_info = '/path/to/cacert.pem';
135
135
$options->user_agent = 'my cool user agent 1.0';
136
136
$options->sleep = 750000; // microseconds, see usleep()
@@ -154,6 +154,15 @@ $multiClient->process();
154
154
The ` URLExtractor ` wraps a PSR-18 ` ClientInterface ` to extract and follow shortened URLs to their original location.
155
155
156
156
``` php
157
+ $options = new HTTPOptions;
158
+ $options->user_agent = 'my cool user agent 1.0';
159
+ $options->ssl_verifypeer = false;
160
+ $options->curl_options = [
161
+ CURLOPT_FOLLOWLOCATION => false,
162
+ CURLOPT_MAXREDIRS => 25,
163
+ ];
164
+
165
+ $httpClient = new CurlClient($responseFactory, $options, $logger);
157
166
$urlExtractor = new URLExtractor($httpClient, $responseFactory);
158
167
159
168
$request = $factory->createRequest('GET', 'https://t.co/ZSS6nVOcVp');
You can’t perform that action at this time.
0 commit comments