Parse all cookies from a response and attach them to the response
Parameters
$response
WpOrgRequestsResponserequired- Response as received.
Source
public function before_redirect_check(Response $response) {
$url = $response->url;
if (!$url instanceof Iri) {
$url = new Iri($url);
}
$cookies = Cookie::parse_from_headers($response->headers, $url);
$this->cookies = array_merge($this->cookies, $cookies);
$response->cookies = $this;
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.