WpOrg\Requests\Cookie
Jar::before_redirect_check
Parse all cookies from a response and attach them to the response
Метод класса: Jar{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Jar = new Jar(); $Jar->before_redirect_check( $response );
- $response(WpOrg\Requests\Response) (обязательный)
- Response as received.
Код Jar::before_redirect_check() Jar::before redirect check WP 7.0.3
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;
}