Dump request into a tmp file
Snippet
Instead of being asleep at 08:36 on 22 June 2015, kitt created this:
Dump the content of an http request into a /tmp
file.
file_name = '/tmp/' + params[:type].gsub(/\./, '_') + '.' + params[:api_version] + '.json' File.open(file_name, "w+") do |f| f.write(request.raw_post) end
Add new comment