ajax请求flask以后得到的响应查看

如果ajax请求的flask函数是这样的:

@app.route('/sendAjax2', methods=['POST'])
@cross_origin()
def sendAjax2():
    # password = request.form.get('password')
    # username = request.args.get('username')
 
    data = json.loads(request.form.get('data'))
    username = data['username']
    password = data['password']
    print (username)
    print (password)
    return "来自Flask的信息:输入用户名和密码"

 

ajax请求flask以后得到的响应查看_第1张图片

你可能感兴趣的:(前端技能)