def request(method, path, options)
      response = connection.send(method) do |request|
        case method
        when :get
          request.url(path, options)
        when :post
          request.path = path
          request.body = options unless options.empty?
        else
          raise Error.new("Unhandled request method #{method}")
        end
      end
      return response.body
    end
def request(method, path, options)
      response = connection.send(method) do |request|
        case method
        when :get
          request.url(path, options)
        when :post
          request.path = path
          request.body = options unless options.empty?
        else
          raise Error.new("Unhandled request method #{method}")
        end
      end
      return response.body
    end
Perform an HTTP request