Closed picks44 closed 4 years ago
Hey,
I saw a bunch of methods flagged as @internal
so I'm not sure it's safe to use but from what I reverse engineered, it seems safe.
use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\HandlerStack;
use TheIconic\Tracking\GoogleAnalytics\Analytics;
use TheIconic\Tracking\GoogleAnalytics\Network\HttpClient;
$handler = HandlerStack::create();
$handler->push(new MyCustomMiddleware());
$client = new HttpClient();
$client->setClient(new GuzzleClient([
'handler' => $handler,
'verify' => false,
'timeout' => 10
]));
$isEnabled = true;
$analytics = new Analytics(false, !$isEnabled);
$analytics->setHttpClient($client);
I'll try this, thanks @eexit
Hi there, I can see there is an $options array in the Analytics constructor, but when I looked a bit further, it seems that it's only dedicated to options "timeout" and "async". What if we want to pass other options (like "verify" => false) to Guzzle? Thanks!