day8 / re-frame-http-fx

A re-frame "effects handler" for performing Ajax tasks (via cljs-ajax)
MIT License
259 stars 26 forks source link

[question] How to get whole response from :on-success? #42

Closed rafauke closed 4 years ago

rafauke commented 4 years ago

Hello :)

Just one question from me - how to get the whole response in :on-success? It looks like the result is response body only.

rafauke commented 4 years ago

For anyone that encounters a similar problem, the answer is to use a correctly configured ring-response-format, like this:

:response-format (ajax/ring-response-format {:format (ajax/json-response-format)})

This isn't super clear but it does the job right.