public function setHttpMethod($method)
    {
        $allowedMethods = array(
             'POST',
             'PUT',
             'GET',
             'DELETE',
             'PATCH'
        );
        if (!in_array(strtoupper($method), $allowedMethods)) {
            throw new \InvalidArgumentException('Provided method not allowed');
        }
        $this->httpMethod = strtoupper($method);
        return $this;
    }