Getting debug output from flask api backend

Hi folks,

are there ways or pointers to how to get the response from a flask api backend from within elm prior to decoding. I can’t seem to get any valid response so i want to see what the actual data returned is. Or better yet, is there a good way to use debug.log to achieve the same. Thanks

If you just want to debug the response, I would simply use the Developer Tools that ship with Firefox / Chrome (press F12 or Ctrl-Shift-i). In the “Network” tab you can see all requests made (e.g. filter by XHR if it’s too many). You can then click on the row with the request in question, and then look at the raw response in the “Response” tab.

Accessing the raw HTTP response in Elm is also possible, but way more complicated, if you don’t need it in the app itself. Here’s a blog post about how this can be done.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.