Sha256: 3426236cead506fa17fbd4f7fd9df752d4ec62b0c1560ed748ad02d1a0bfd242
Contents?: true
Size: 642 Bytes
Versions: 13
Compression:
Stored size: 642 Bytes
Contents
module DHLEcommerceAPI class Connection < ActiveResource::Connection def request(method, path, *arguments) result = ActiveSupport::Notifications.instrument("request.active_resource") do |payload| payload[:method] = method payload[:request_uri] = "#{site.scheme}://#{site.host}:#{site.port}#{path}" payload[:result] = http.send(method, path, *arguments) # debug outgoing request here if needed end handle_response(result) rescue Timeout::Error => e raise TimeoutError.new(e.message) rescue OpenSSL::SSL::SSLError => e raise SSLError.new(e.message) end end end
Version data entries
13 entries across 13 versions & 1 rubygems