Sha256: 192836fc784e96735baf4fabe3462ed5ea0c8a5b6d1ca3d2b4a17fe7466c56bb
Contents?: true
Size: 516 Bytes
Versions: 2
Compression:
Stored size: 516 Bytes
Contents
# frozen_string_literal: true require 'http' class HTTPAdapter < HTTPBaseAdapter def send_get_request client.get(parse_uri(true).to_s) end def send_head_request client.head(parse_uri.to_s) end def send_post_request client.post(parse_uri.to_s, body: @data) end def send_post_form_request client.post(parse_uri.to_s, form: @params) end private def client method_name = respond_to?(:with_headers) ? :with_headers : :headers ::HTTP.send(method_name, @headers) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
httplog-1.3.1 | spec/adapters/http_adapter.rb |
httplog-1.3.0 | spec/adapters/http_adapter.rb |