def request(method, path, params = {}, options = {})

      raise AirbrakeError.new('API Token cannot be nil') if @auth_token.nil?
      raise AirbrakeError.new('Account cannot be nil') if @account.nil?

      response = connection(options).run_request(method, nil, nil, nil) do |request|
        case method
        when :delete, :get
          request.url(path, params.merge(:auth_token => @auth_token))
        when :post, :put
          request.url(path, :auth_token => @auth_token)
          request.body = params unless params.empty?
        end
      end
      response.body
    end
def request(method, path, params = {}, options = {})

      raise AirbrakeError.new('API Token cannot be nil') if @auth_token.nil?
      raise AirbrakeError.new('Account cannot be nil') if @account.nil?

      response = connection(options).run_request(method, nil, nil, nil) do |request|
        case method
        when :delete, :get
          request.url(path, params.merge(:auth_token => @auth_token))
        when :post, :put
          request.url(path, :auth_token => @auth_token)
          request.body = params unless params.empty?
        end
      end
      response.body
    end
Perform an HTTP request