/** * @param array $cookies */ protected function buildCookies(array $cookies) { $header = ''; foreach ($cookies as $key => $value) { $header .= $this->formatCookie($key, $value) . ' '; } $this->holder->getHeaders()->set('cookie', $header); }
/** * Parse headers for cookies. */ protected function searchCookiesInHeaders() { $headers = $this->holder->getHeaders()->get('set-cookie'); foreach ($headers as $header) { $cookie = $this->createCookieFromHeader($header); if ($cookie !== null) { $this->storeCookie($cookie); } } }
/** * @return bool */ public function hasBasicAuth() { return $this->parser->hasBasicAuth($this->holder->getHeaders()); }