Sha256: 4fe5d40573d753be1a5d4c075d73488b73f833353d7983276571b7eb132b96e1

Contents?: true

Size: 535 Bytes

Versions: 2

Compression:

Stored size: 535 Bytes

Contents

require "ethon"
class EthonAdapter < HTTPBaseAdapter
  def send_get_request
    easy = Ethon::Easy.new
    easy.http_request(parse_uri.to_s, :get, { headers: @headers })
    easy.perform
  end

  def send_head_request
    easy = Ethon::Easy.new
    easy.http_request(parse_uri.to_s, :head, { headers: @headers })
    easy.perform
  end

  def send_post_request
    easy = Ethon::Easy.new
    easy.http_request(parse_uri.to_s, :post, { headers: @headers, body: @data })
    easy.perform
  end

  def self.is_libcurl?
    true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
httplog-1.0.2 spec/adapters/ethon_adapter.rb
httplog-1.0.1 spec/adapters/ethon_adapter.rb