Module: Requester::Requests

Included in:
Requester, Requester
Defined in:
lib/requester/requests.rb

Constant Summary collapse

REQUEST_TYPES =
[
  :xhr, :get, :put, :patch, :post, :delete, :head
]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.log_data(request:, response:, controller:, **options) ⇒ Object



21
22
23
24
25
# File 'lib/requester/requests.rb', line 21

def self.log_data(request:, response:, controller:, **options)
  return unless ENV['REQUESTER']
  Logger.log_response(response, controller, options)
  Logger.log_request(request, controller, options)
end

Instance Method Details

#log_data(**options) ⇒ Object



16
17
18
19
# File 'lib/requester/requests.rb', line 16

def log_data(**options)
  Logger.log_response(response, controller, options)
  Logger.log_request(request, controller, options)
end