Requests_Response::is_redirect()

最后更新于:2021-11-26 04:02:31

Requests_Response::is_redirect()

Is the response a redirect?

响应

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

源文件

文件: gc-includes/Requests/Response.php

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