python flask get 和 post

纵然是瞬间 提交于 2020-03-25 22:42:33
post获取ordersn_list=str(request.form['ordersn_list'])
shopid=int(request.form['shopid'])
  limit=request.form.get('limit')
 
get获取
ordersn_list1=str(request.args.get('ordersn_list'))
shopid=int(request.args.get('shopid'))
@app.route('/get_airway_bill', methods=['GET', 'POST'])
def get_airway_bill():
    # ordersn_list=str(request.form['ordersn_list'])
    # shopid=int(request.form['shopid'])
    ordersn_list1=str(request.args.get('ordersn_list'))
    shopid=int(request.args.get('shopid'))
    return do_get_airway_bill(ordersn_list1,shopid)
 
 
 
 
if __name__ == '__main__':
    app.run(host='0.0.0.0',port=18811,debug=True)   #外网访问

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!