mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
add checks for HEAD request
This commit is contained in:
@ -154,6 +154,15 @@ class Request extends \yii\base\Request
|
|||||||
return $this->getMethod() === 'OPTIONS';
|
return $this->getMethod() === 'OPTIONS';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this is a HEAD request.
|
||||||
|
* @return boolean whether this is a HEAD request.
|
||||||
|
*/
|
||||||
|
public function getIsHead()
|
||||||
|
{
|
||||||
|
return $this->getMethod() === 'HEAD';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this is a POST request.
|
* Returns whether this is a POST request.
|
||||||
* @return boolean whether this is a POST request.
|
* @return boolean whether this is a POST request.
|
||||||
|
Reference in New Issue
Block a user