Jar::before_redirect_check( WpOrgRequestsResponse $response )
Parse all cookies from a response and attach them to the response
Parameters
- $response
-
(Required) Response as received.
Source
File: wp-includes/Requests/src/Cookie/Jar.php
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;
}