Class: HTTParty::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/editmode/monkey_patches.rb

Instance Method Summary collapse

Instance Method Details

#_original_performObject



6
# File 'lib/editmode/monkey_patches.rb', line 6

alias_method :_original_perform, :perform

#perform(&block) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/editmode/monkey_patches.rb', line 7

def perform(&block)
  payload = {
    method: http_method.const_get(:METHOD),
    url: uri
  }
  ActiveSupport::Notifications.instrument 'request.httparty', payload do
    _original_perform(&block)
  end
end