This is my Python code:
@app.route("/getdata", methods=['GET'])
def get_User():
myuser= User
myuser=User.query.all()
if myuser =="":
return 404
return HttpResponse(myuser, content_type="application/json")
I am trying to make sure the data I send is in JSON format. but it is giving me an error. Can I not use HttpResponse in Flask?