peridot
peridot copied to clipboard
Show the body of urlencoded requests
When debugging why a ring-anti-forgery test is failing, it's kind of hard without seeing the form urlencoded params that are being sent. I know what I think I'm sending, but the error I'm getting back indicates that what is being received is not correct.
i.e., with a form request, the result comes back as:
{:request
{ :content-type "application/x-www-form-urlencoded",
:body #<BufferedInputStream java.io.BufferedInputStream@24cd65cc>}, }}
It'd be helpful to see what exactly that :body was. However, trying to slurp the body doesn't work because the stream has long since been closed by the time request returns.
Plus one. Having exactly the same issue with ring-anti-forgery test failing. It seems as though peridot is converting urlencoded '+' to a space.
Just looking over this just now, is there a rewindable input stream we could use instead?