Sha256: b7218ae895fddeee5669b126f9ca3274a23bd0f899b6ac18ba4fdefdd6625a9f
Contents?: true
Size: 479 Bytes
Versions: 2
Compression:
Stored size: 479 Bytes
Contents
require 'http' class HTTPAdapter < HTTPBaseAdapter def send_get_request client.get(parse_uri.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.0.2 | spec/adapters/http_adapter.rb |
httplog-1.0.1 | spec/adapters/http_adapter.rb |