lib/Middleware/Cookie/CookieJar.php
public function processSetCookieHeaders(RequestInterface $request, ResponseInterface $response): void
    {
        $host = $request->getUri()->getHost();
        foreach ($response->getHeader('Set-Cookie') as $header) {
            $cookie = new Cookie();
            $cookie->fromSetCookieHeader($header, $host);
            $this->addCookie($cookie);
        }
    }
public function processSetCookieHeaders(RequestInterface $request, ResponseInterface $response): void
    {
        $host = $request->getUri()->getHost();
        foreach ($response->getHeader('Set-Cookie') as $header) {
            $cookie = new Cookie();
            $cookie->fromSetCookieHeader($header, $host);
            $this->addCookie($cookie);
        }
    }
Processes Set-Cookie headers from a request/response pair.