Skip to content
Advertisement

middleware caught exception in streamed response flask app

This is an simple application that inserts data into a mysql db. The data gets inserted correctly but i am not getting the reponse of my post request but the status is 200.request.form works but i want to send json as payload This is my below route and i believe something is wrong when i am checking if the keys exist in my json payload. i tried using request.json,request.get_json,request.get_json() but i am unable to get rid of this error although the status is 200 but application is not returning any message.

JavaScript

this is my below response:

JavaScript

and this

JavaScript

Advertisement

Answer

Eventually i declared this twice

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement