Does anyone know how to send a working and non-blocking async request using guzzlephp?
There seems to be a support for this but it does not seem to be implemented
<?php
$this->guzzle->requestAsync('post', 'http://', ['synchronous' => false])->wait();
?>
Implemented in a sense that it does not wait for the response.
There is also a problem with php-ga-measurement-protocol
$analytics->setAsyncRequest(true)->sendPageview();
What problem you are talking about?
Async requests work fine in Guzzle, exactly as you described. You just get a promise from
requestAsync()immediately, do other stuff and take the response, when you are ready.Don't know about php-ga-measurement-protocol, BTW, but seems that this lib implements them correctly too.