lib/digital_river/request/debug.rb
# Prints debug information about request/response
#
# @return [Response]
#
# @api public
#
# @example
#   Request::Raw.class_eval do
#     include Debug
#   end
Prints debug information about request/response
Prints debug information about request / response
def run
        method = options.fetch(:method, "no method given").upcase
        puts "--- REQUEST: #{method} #{url} ---"
        ap options
        puts "---"
        response = super
        puts "--- RESPONSE: #{response.status} ---"
        ap response.headers
        ap response.body
        puts "---"
        response
      end
def run method = options . fetch ( :method , "no method given" ) . upcase puts "--- REQUEST: #{method} #{url} ---" ap options puts "---" response = super puts "--- RESPONSE: #{response.status} ---" ap response . headers ap response . body puts "---" response end
Prints debug information about request/response
Prints debug information about request / response
None
Response
api
None
example
:Raw.class_eval do include Debug end
: Raw . class_eval do include Debug end