public function addCookieHeaders(RequestInterface $request): RequestInterface
    {
        $cookies = [];
        foreach ($this->getCookies() as $cookie) {
            if ($cookie->matchesRequest($request)) {
                $cookies[] = $cookie->toCookieHeader();
            }
        }
        if ($cookies) {
            $request = $request->withAddedHeader('Cookie', implode('; ', $cookies));
        }

        return $request;
    }
public function addCookieHeaders(RequestInterface $request): RequestInterface
    {
        $cookies = [];
        foreach ($this->getCookies() as $cookie) {
            if ($cookie->matchesRequest($request)) {
                $cookies[] = $cookie->toCookieHeader();
            }
        }
        if ($cookies) {
            $request = $request->withAddedHeader('Cookie', implode('; ', $cookies));
        }

        return $request;
    }
public function addCookieHeaders ( RequestInterface $ request ) : RequestInterface { $ cookies = [ ] ; foreach ( $ this -> getCookies ( ) as $ cookie ) { if ( $ cookie -> matchesRequest ( $ request ) ) { $ cookies [ ] = $ cookie -> toCookieHeader ( ) ; } } if ( $ cookies ) { $ request = $ request -> withAddedHeader ( 'Cookie' , implode ( '; ' , $ cookies ) ) ; } return $ request ; }
Adds Cookie headers to the supplied request.
Adds Cookie headers to the supplied request .