class Net::HTTP

Public Instance Methods

orig_request(req, body = nil) click to toggle source
Alias for: request
request(req, body = nil) { |response| ... } click to toggle source

hook into net code to get request and response for it

# File lib/core-ext/net/http.rb, line 9
def request(req, body = nil, &block)  # :yield: +response+
  return orig_request req, body, &block unless started? #if not started don't log twice
  NetObserver::Base.instance.request_data(self, req, body)
  res = orig_request req, body, &block
  NetObserver::Base.instance.response_data(self, res)
  res
end
Also aliased as: orig_request