Fork me on GitHub

I have to debug ring request. body-string as a first wrapper read nil from body. It works after wrap-restful-format but then it is too late. I want to see original string sent by client. How can I do it? While it looks easy it is not 🙂 To be specific I debug JSON request, so something like this curl -H "Content-Type: application/json" -d @foo.json -i .


I expect client send numbers in wrong format, but I can’t prove it, because it looks ring correct them, but in some magic way not everywhere.


Otherwise it is magic ring bug


The issue is about (wrap-json-body {:keywords? true :bigdecimals? true}) which have correct values 0.1M, but in only one client has 0.10000000000000001M. params and body-params are qual. Only body has a difference. It is weird.


So it looks like wrap-restful-format doesn’t work with string as a :body. So reading body before this wrapper is an issue. I am curious why it is working like that.


another fact is slurp can read body while ring.util.request/body-string can’t