public
Created

  • Download Gist
http_trace.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11
Earthquake.once do
require 'webmock'
WebMock.allow_net_connect!
WebMock.after_request do |request, response|
puts "#{request.method.upcase} #{request.uri} #{request.body}".c(34)
puts response.status.join(' ').c(34)
puts response.body.c(34)
# puts response.headers.map {|key, val| "#{key}: #{val}" }.join("\n")
Readline.refresh_line
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.