Class Guzzle\Plugin\Async\AsyncPlugin

InheritanceGuzzle\Plugin\Async\AsyncPlugin
ImplementsSymfony\Component\EventDispatcher\EventSubscriberInterface

Sends requests but does not wait for the response

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getSubscribedEvents() Guzzle\Plugin\Async\AsyncPlugin
onBeforeSend() Event used to ensure that progress callback are emitted from the curl handle's request mediator. Guzzle\Plugin\Async\AsyncPlugin
onCurlProgress() Event emitted when a curl progress function is called. When the amount of data uploaded == the amount of data to upload OR any bytes have been downloaded, then time the request out after 1ms because we're done with transmitting the request, and tell curl not download a body. Guzzle\Plugin\Async\AsyncPlugin
onRequestSent() Event emitted when a request completes because it took less than 1ms. Add an X-Guzzle-Async header to notify the caller that there is no body in the message. Guzzle\Plugin\Async\AsyncPlugin
onRequestTimeout() Event emitted when a curl exception occurs. Ignore the exception and set a mock response. Guzzle\Plugin\Async\AsyncPlugin

Method Details

getSubscribedEvents() public static method

public static void getSubscribedEvents ( )
onBeforeSend() public method

Event used to ensure that progress callback are emitted from the curl handle's request mediator.

public void onBeforeSend ( Guzzle\Common\Event $event )
$event Guzzle\Common\Event
onCurlProgress() public method

Event emitted when a curl progress function is called. When the amount of data uploaded == the amount of data to upload OR any bytes have been downloaded, then time the request out after 1ms because we're done with transmitting the request, and tell curl not download a body.

public void onCurlProgress ( Guzzle\Common\Event $event )
$event Guzzle\Common\Event
onRequestSent() public method

Event emitted when a request completes because it took less than 1ms. Add an X-Guzzle-Async header to notify the caller that there is no body in the message.

public void onRequestSent ( Guzzle\Common\Event $event )
$event Guzzle\Common\Event
onRequestTimeout() public method

Event emitted when a curl exception occurs. Ignore the exception and set a mock response.

public void onRequestTimeout ( Guzzle\Common\Event $event )
$event Guzzle\Common\Event