re: Talking to Python from JavaScript (and Back Again!) VIEW POST

re: Thank you for this tutorial Andrew. In your use of the fetch library, I believe that in order to send valid JSON you need to add the following to t...

You're correct, this is the best way to do it as it's more explicit, and certain web servers will require the header. I'd love to know what header it uses by default as my examples worked and I wanted to cut down on code so I removed it. I assumed that by default it was actually using 'application/json'. Hm 😊


For me when I sent the payload to the flask/python side it was interpreted as nonetype.

Ah, well there's our answer. Great. Thanks for letting me know! I'll update this post later 👍

code of conduct - report abuse