ruby on rails - Can I log the unhandled VCR request body? -
i'm using vcr gem mock http queries. i've recorded cassettes, had change stuff around, , i'm getting error:
an http request has been made vcr not know how handle: post http://api.endpoint.here/path.json
now, because it's post request, vcr configured match on body path. can log or dump body of unhandled request can tweak cassettes accordingly? thank you.
won't callback achieve need?
vcr.configure |c| c.after_http_request |request, response| if request.method == :post puts "post request:#{request.uri}" puts "#{request.to_hash}" # or request.body end end c.allow_http_connections_when_no_cassette = true end
Comments
Post a Comment