Requests_Response::is_redirect()publicWP 1.0

Is the response a redirect?

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

No Hooks.

Return

true|false. True if redirect (3xx status), false if not.

Usage

$Requests_Response = new Requests_Response();
$Requests_Response->is_redirect();

Code of Requests_Response::is_redirect() WP 6.0

public function is_redirect() {
	$code = $this->status_code;
	return in_array($code, array(300, 301, 302, 303, 307), true) || $code > 307 && $code < 400;
}