class Patron::Session
Public Instance Methods
request(action_name, url, headers, options = {})
click to toggle source
# File lib/httplog/adapters/patron.rb, line 7 def request(action_name, url, headers, options = {}) bm = Benchmark.realtime do @response = orig_request(action_name, url, headers, options) end if HttpLog.url_approved?(url) HttpLog.call( method: action_name, url: url, request_body: options[:data], request_headers: headers, response_code: @response.status, response_body: @response.body, response_headers: @response.headers, benchmark: bm, encoding: @response.headers['Content-Encoding'], content_type: @response.headers['Content-Type'], mask_body: HttpLog.masked_body_url?(url) ) end @response end
Also aliased as: orig_request