WordPress at a glance
function is not described

Requests_Cookie_Jar::before_redirect_check() public WP 1.0

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

@var Requests_Response $response

{} It's a method of the class: Requests_Cookie_Jar{}

No Hooks.


null. Nothing.


$Requests_Cookie_Jar = new Requests_Cookie_Jar();
$Requests_Cookie_Jar->before_redirect_check( $return );
$return(Requests_Response) (required)

Code of Requests_Cookie_Jar::before_redirect_check() WP 5.7.2

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;