public function setMethod(string $method): RequestContext
    {
        $method = strtoupper($method);

        if (!in_array($method, self::$availableMethods)) {
            throw new RequestContextException('Supplied HTTP method is not supported');
        }

        $this->method = $method;

        return $this;
    }
public function setMethod(string $method): RequestContext
    {
        $method = strtoupper($method);

        if (!in_array($method, self::$availableMethods)) {
            throw new RequestContextException('Supplied HTTP method is not supported');
        }

        $this->method = $method;

        return $this;
    }
public function setMethod ( string $ method ) : RequestContext { $ method = strtoupper ( $ method ) ; if ( ! in_array ( $ method , self :: $ availableMethods ) ) { throw new RequestContextException ( 'Supplied HTTP method is not supported' ) ; } $ this -> method = $ method ; return $ this ; }
Override default HTTP method

@param string $method

@throws RequestContextException

@return RequestContext
Override default HTTP method