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;
    }