Skip to content

Instantly share code, notes, and snippets.

@stephenrichards
Created January 30, 2020 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenrichards/4ce62c67580ca04d64cf0f4203fbf0eb to your computer and use it in GitHub Desktop.
Save stephenrichards/4ce62c67580ca04d64cf0f4203fbf0eb to your computer and use it in GitHub Desktop.
Display CFE interaction for an application
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