src/Guzzle/Plugin/Cookie/CookiePlugin.php
public function onRequestBeforeSend(Event $event)
    {
        $request = $event['request'];
        if (!$request->getParams()->get('cookies.disable')) {
            $request->removeHeader('Cookie');
            // Find cookies that match this request
            foreach ($this->cookieJar->getMatchingCookies($request) as $cookie) {
                $request->addCookie($cookie->getName(), $cookie->getValue());
            }
        }
    }
public function onRequestBeforeSend(Event $event)
    {
        $request = $event['request'];
        if (!$request->getParams()->get('cookies.disable')) {
            $request->removeHeader('Cookie');
            // Find cookies that match this request
            foreach ($this->cookieJar->getMatchingCookies($request) as $cookie) {
                $request->addCookie($cookie->getName(), $cookie->getValue());
            }
        }
    }
public function onRequestBeforeSend ( Event $ event ) { $ request = $ event [ 'request' ] ; if ( ! $ request -> getParams ( ) -> get ( 'cookies.disable' ) ) { $ request -> removeHeader ( 'Cookie' ) ; // Find cookies that match this request foreach ( $ this -> cookieJar -> getMatchingCookies ( $ request ) as $ cookie ) { $ request -> addCookie ( $ cookie -> getName ( ) , $ cookie -> getValue ( ) ) ; } } }
Add cookies before a request is sent

@param Event $event
Add cookies before a request is sent