File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 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
130130` HTTPOptions ` and ` LoggerInterface ` are optional:
131131
132132``` php
133- $options = new HTTPOptions;
133+ $options = new HTTPOptions;
134134$options->ca_info = '/path/to/cacert.pem';
135135$options->user_agent = 'my cool user agent 1.0';
136136$options->sleep = 750000; // microseconds, see usleep()
@@ -154,6 +154,15 @@ $multiClient->process();
154154The ` URLExtractor ` wraps a PSR-18 ` ClientInterface ` to extract and follow shortened URLs to their original location.
155155
156156``` 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);
157166$urlExtractor = new URLExtractor($httpClient, $responseFactory);
158167
159168$request = $factory->createRequest('GET', 'https://t.co/ZSS6nVOcVp');
You can’t perform that action at this time.
0 commit comments