Created
January 30, 2020 16:33
-
-
Save stephenrichards/4ce62c67580ca04d64cf0f4203fbf0eb to your computer and use it in GitHub Desktop.
Display CFE interaction for an application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
laa = LegalAidApplication.find_by application_ref: 'L-HUV-KKR' | |
cfe_submissions = laa.cfe_submissions.first.submission_histories | |
cfe_submissions.each do |h| | |
puts "#{h.http_method} #{h.url}" | |
unless h.http_method == 'GET' | |
puts "request:" | |
pp JSON.parse(h.request_payload) | |
end | |
puts "response:" | |
pp JSON.parse(h.response_payload) | |
puts "***************************************************************\n\n" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment