peridot icon indicating copy to clipboard operation
peridot copied to clipboard

Show the body of urlencoded requests

Open kenrestivo opened this issue 11 years ago • 2 comments

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.

kenrestivo avatar Nov 14 '13 02:11 kenrestivo

Plus one. Having exactly the same issue with ring-anti-forgery test failing. It seems as though peridot is converting urlencoded '+' to a space.

elrob avatar Feb 05 '15 12:02 elrob

Just looking over this just now, is there a rewindable input stream we could use instead?

glenjamin avatar Dec 01 '15 23:12 glenjamin