DEV Community

loading...

Discussion on: Talking to Python from JavaScript (and Back Again!)

Collapse
healeycodes profile image
Andrew Healey Author

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 😊

Collapse
avainlakech profile image
avainlakech

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

Thread Thread
healeycodes profile image
Andrew Healey Author

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