private function onBeforeSend(RequestInterface $request, array &$options)
    {
        $base_uri = null;
        if (isset($options['base_uri']) && $options['base_uri']) {
            if ($options['base_uri'] instanceof UriInterface) {
                $base_uri = $options['base_uri'];
            }
        }

        $cookieJar = $this->getCookieJar($options, $base_uri);
        return $cookieJar->withCookieHeader($request);
    }
private function onBeforeSend(RequestInterface $request, array &$options)
    {
        $base_uri = null;
        if (isset($options['base_uri']) && $options['base_uri']) {
            if ($options['base_uri'] instanceof UriInterface) {
                $base_uri = $options['base_uri'];
            }
        }

        $cookieJar = $this->getCookieJar($options, $base_uri);
        return $cookieJar->withCookieHeader($request);
    }
private function onBeforeSend ( RequestInterface $ request , array & $ options ) { $ base_uri = null ; if ( isset ( $ options [ 'base_uri' ] ) && $ options [ 'base_uri' ] ) { if ( $ options [ 'base_uri' ] instanceof UriInterface ) { $ base_uri = $ options [ 'base_uri' ] ; } } $ cookieJar = $ this -> getCookieJar ( $ options , $ base_uri ) ; return $ cookieJar -> withCookieHeader ( $ request ) ; }
Inject the cookie in the request

@param RequestInterface $request The request
@param array $options Guzzle options array
@return RequestInterface The changed request
Inject the cookie in the request