在您的Javascript中,将数据转换为JSON并将设置
contentType为
"application/json":
data: JSON.stringify({'hotel':hotel}),contentType : "application/json",在flask函数中,使用来获取JSON
request.json:
@app.route('/getHotels')def getHotels(): hotel = request.json['hotel'] .....


