WpOrg\Requests\Cookie
Jar::before_redirect_check()
Parse all cookies from a response and attach them to the response
Method of the class: Jar{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Jar = new Jar(); $Jar->before_redirect_check( $response );
- $response(\WpOrg\Requests\Response) (required)
- Response as received.
Jar::before_redirect_check() Jar::before redirect check code WP 6.6.2
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; }