Dump request into a tmp file
Snippet
Posted by kitt at 08:36 on 22 June 2015
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