Requests_Cookie_Jar::before_redirect_check()publicWP 1.0

Parse all cookies from a response and attach them to the response

Метод класса: Requests_Cookie_Jar{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$Requests_Cookie_Jar = new Requests_Cookie_Jar();
$Requests_Cookie_Jar->before_redirect_check( $return );
$return(Requests_Response) (обязательный)
-

Код Requests_Cookie_Jar::before_redirect_check() WP 6.1.1

public function before_redirect_check(Requests_Response $return) {
	$url = $return->url;
	if (!$url instanceof Requests_IRI) {
		$url = new Requests_IRI($url);
	}

	$cookies         = Requests_Cookie::parse_from_headers($return->headers, $url);
	$this->cookies   = array_merge($this->cookies, $cookies);
	$return->cookies = $this;
}