src/Guzzle/Http/RedirectPlugin.php
protected function getOriginalRequest(RequestInterface $request)
    {
        $original = $request;
        // The number of redirects is held on the original request, so determine which request that is
        while ($parent = $original->getParams()->get(self::PARENT_REQUEST)) {
            $original = $parent;
        }

        return $original;
    }
protected function getOriginalRequest(RequestInterface $request)
    {
        $original = $request;
        // The number of redirects is held on the original request, so determine which request that is
        while ($parent = $original->getParams()->get(self::PARENT_REQUEST)) {
            $original = $parent;
        }

        return $original;
    }
protected function getOriginalRequest ( RequestInterface $ request ) { $ original = $ request ; // The number of redirects is held on the original request, so determine which request that is while ( $ parent = $ original -> getParams ( ) -> get ( self :: PARENT_REQUEST ) ) { $ original = $ parent ; } return $ original ; }
Get the original request that initiated a series of redirects

@param RequestInterface $request Request to get the original request from

@return RequestInterface
Get the original request that initiated a series of redirects