From a6794a3dede157559665846e50d139f44201bf86 Mon Sep 17 00:00:00 2001 From: smiley Date: Mon, 11 Mar 2024 10:58:38 +0100 Subject: [PATCH] :octocat: --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8653c20..e767a5d9 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ You can then invoke the multi request client - the `MultiResponseHandlerInterfac `HTTPOptions` and `LoggerInterface` are optional: ```php -$options = new HTTPOptions; +$options = new HTTPOptions; $options->ca_info = '/path/to/cacert.pem'; $options->user_agent = 'my cool user agent 1.0'; $options->sleep = 750000; // microseconds, see usleep() @@ -154,6 +154,15 @@ $multiClient->process(); The `URLExtractor` wraps a PSR-18 `ClientInterface` to extract and follow shortened URLs to their original location. ```php +$options = new HTTPOptions; +$options->user_agent = 'my cool user agent 1.0'; +$options->ssl_verifypeer = false; +$options->curl_options = [ + CURLOPT_FOLLOWLOCATION => false, + CURLOPT_MAXREDIRS => 25, +]; + +$httpClient = new CurlClient($responseFactory, $options, $logger); $urlExtractor = new URLExtractor($httpClient, $responseFactory); $request = $factory->createRequest('GET', 'https://t.co/ZSS6nVOcVp');