Is there a way to dump all incoming requests to a Sinatra application in the exact way the application receives the data? Maybe some sort of Rack middleware?
相关问题
- How to specify memcache server to Rack::Session::M
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
- reference to a method?
- ruby 1.9 wrong file encoding on windows
相关文章
- Ruby using wrong version of openssl
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- “No explicit conversion of Symbol into String” for
- Segmentation fault with ruby 2.0.0p247 leading to
- How to detect if an element exists in Watir
- uninitialized constant Mysql2::Client::SECURE_CONN
- ruby - simplify string multiply concatenation
I run thin with the
-D
and-V
flags when I want to debug 'things':If you are trying to get the raw output from a request, use the request method like:
See "GETTING STARTED" for more information.
Maybe this is not what you're asking, but I arrived here looking for a way to see all the HTTP request headers in Sinatra (without actually having to enumerate them, to debug a proxied request). I found this quite useful:
Or, to return that blob in the response in a legible json format:
And voila, all the request details: