I'm running a simple WEBrick server to debug POST data. I'd like to output the POST data to the log.
My code is:
server.mount_proc '/' do |req, res|
res.body = "Web server response:\n"
# Output POST data here...
end
where server is simply a WEBrick server.
Any suggestions?
Access raw post data using
req.body.If you want parsed data (as hash), use
req.queryinstead.UPDATE
Customize
:AccessLog: