我有这样的方法:
def make_request(path, params, body)
raise ArgumentError.new('Endpoint not set!') if url.nil?
conditions = {url: url}
conditions[:params] = params unless params.blank?
connection = Faraday::Connection.new(conditions)
connection.run_request(:get, path, body, {'Content-Type' => 'application/json'})
end
然后我怎样才能在那里添加keep-alive?此外,由于每次调用此方法时我都会实例化一个连接对象(url可能不同),keep-alive参数是否仍然有效?