Prado\Web\THttpRequest::getRequestType PHP Method

getRequestType() public method

public getRequestType ( ) : string
return string request type, can be GET, POST, HEAD, or PUT
    public function getRequestType()
    {
        return isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : null;
    }

Usage Example

Beispiel #1
0
 public function testGetRequestType()
 {
     $request = new THttpRequest();
     self::assertEquals('GET', $request->getRequestType());
 }