protected function validateMethod($method)
    {
        $valid = [
            'GET'     => true,
            'POST'    => true,
            'DELETE'  => true,
            'PUT'     => true,
            'PATCH'   => true,
            'HEAD'    => true,
            'OPTIONS' => true,
        ];

        if (!isset($valid[$method])) {
            throw new InvalidArgumentException(
                'Invalid method version. Must be one of: GET, POST, DELETE, PUT, PATCH, HEAD or OPTIONS'
            );
        }
    }