Api Axios POST导致空

Api Axios POST导致空,api,vue.js,post,flask,axios,Api,Vue.js,Post,Flask,Axios,这是我的密码 @app.route("/", methods=['GET','POST']) @cross_origin() def helloWorld(): data = request.json return jsonify(data) 我正在Vue中使用axios将数据发布到localhost:5000。我可以发布它,但在烧瓶中显示为空 axios.post('http://127.0.0.1:5000/', { firstName: 'Fred', l

这是我的密码

@app.route("/", methods=['GET','POST'])
@cross_origin()
def helloWorld():
    data = request.json
    return jsonify(data)
我正在Vue中使用axios将数据发布到localhost:5000。我可以发布它,但在烧瓶中显示为空

axios.post('http://127.0.0.1:5000/', {
    firstName: 'Fred',
    lastName: 'Flintstone'
      })
      .then(function (response) {
        console.log(response.data);
      })
      .catch(function (error) {
        console.log(error);
      });
当我在Vue中执行此操作时

axios
      .get('http://127.0.0.1:5000')
      .then(response => console.log(response))
      .catch(error => console.log(error))
我得到了正确的输出,即发布的数据,但在烧瓶中,我得到了null作为响应。
有人知道为什么会发生这种情况吗?

从邮寄地址中删除最后一个
/

将CORS添加到烧瓶:我已经在烧瓶中添加了CORS@法泽尔·法尼亚还有其他原因导致这个问题吗