public function setHttpMethod($method)
    {
        $allowed_methods = array('GET', 'POST');

        $method = strtoupper( $method );

        if ( !in_array( $method, $allowed_methods ) ) {
            throw new Exception('Unsupported HTTP Method: ' . $method . '. Supported methods are: ' . join($allowed_methods, ', '));
        }

        $this->httpMethod = $method;
    }
public function setHttpMethod($method)
    {
        $allowed_methods = array('GET', 'POST');

        $method = strtoupper( $method );

        if ( !in_array( $method, $allowed_methods ) ) {
            throw new Exception('Unsupported HTTP Method: ' . $method . '. Supported methods are: ' . join($allowed_methods, ', '));
        }

        $this->httpMethod = $method;
    }
public function setHttpMethod ( $ method ) { $ allowed_methods = array ( 'GET' , 'POST' ) ; $ method = strtoupper ( $ method ) ; if ( ! in_array ( $ method , $ allowed_methods ) ) { throw new Exception ( 'Unsupported HTTP Method: ' . $ method . '. Supported methods are: ' . join ( $ allowed_methods , ', ' ) ) ; } $ this -> httpMethod = $ method ; }
Set the HTTP Method.

Supported methods are: GET, POST

@param $method
@throws \Exception
Set the HTTP Method .