【发布时间】:2019-02-06 00:01:41
【问题描述】:
我已经尝试了一段时间,但我没能从我的后端、我的前端获得返回值。
这是我的代码:
def add_New_Form():
resp = Response("something") #Note that the response value is a string
return resp
我希望能够在我的前端使用它(我正在使用 Vue)。我不能 jsonify resp 因为 Response 不是 jsonifyable。我试过了:
var name = this.$http.post(*My request here*)
但这并不像我期望的那样工作。
提前致谢。
【问题讨论】:
标签: javascript python json flask vue.js