如何使烧瓶反应显示在XHR过滤器中?

时间:2018-12-23 02:19:14

标签: python-3.x flask

什么使响应被chrome中的XHR过滤器过滤?

到目前为止,我已经有了这段代码

@app.route('/', methods = ['GET'])
def hello_world():
  data = {
      'hello'  : 'world',
      'number' : 3
  }
  js = json.dumps(data)

  resp = Response(js, status=200, mimetype='application/json')

  return resp

但是,当我在chrome中添加XHR过滤器时,如果您看下面的图片,则该请求不会被过滤到XHR请求中。我需要在标题中添加什么?

Not an XHR

0 个答案:

没有答案