Sha256: fd8749acb071d189e4dcf3757b3e562188832b513d6b9270970fcc96e5f2e429

Contents?: true

Size: 439 Bytes

Versions: 2

Compression:

Stored size: 439 Bytes

Contents

class NetHTTPAdapter < HTTPBaseAdapter
  def send_get_request
    Net::HTTP.get_response(@host, [@path, @data].compact.join('?'), @port)
  end

  def send_head_request
    http = Net::HTTP.new(@host, @port)
    http.head(@path, @headers)
  end

  def send_post_request
    http = Net::HTTP.new(@host, @port)
    resp = http.post(@path, @data)
  end

  def send_post_form_request
    res = Net::HTTP.post_form(parse_uri, @params)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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