require 'faraday' module HttpEventLogger module Test module Driver class Faraday < HttpEventLogger::Test::Driver::Base def send_get_request connection.get do |req| req.url(uri) req.headers = @headers end end def send_post_request connection.post do |req| req.url(uri) req.headers = @headers req.body = @data end end private def connection ::Faraday.new(url: "#{@protocol}://#{@host}:#{@port}") do |faraday| faraday.adapter(::Faraday.default_adapter) # Uses Net::HTTP end end end end end end