def call(request)
      m = request.method.downcase.to_sym

      # Only respond to listed methods
      unless respond_to?(m)
        allowed = METHODS.select { |m| respond_to?(m) }.map(&:upcase).join(', ')
        return [
          405,
          { 'Content-Type' => 'text/plain', 'Allow' => allowed },
          "Method not allowed: '#{request.env['REQUEST_METHOD']}'"
        ]
      end

      begin
        send(m, request)
      rescue RestError => e
        error(e.response_code, e.error)
      end
    end
def call(request)
      m = request.method.downcase.to_sym

      # Only respond to listed methods
      unless respond_to?(m)
        allowed = METHODS.select { |m| respond_to?(m) }.map(&:upcase).join(', ')
        return [
          405,
          { 'Content-Type' => 'text/plain', 'Allow' => allowed },
          "Method not allowed: '#{request.env['REQUEST_METHOD']}'"
        ]
      end

      begin
        send(m, request)
      rescue RestError => e
        error(e.response_code, e.error)
      end
    end
Call the request.

 @param [CommunityZero::Request] request
   the request object