- Flask 中 使用 request 库发请求
- (get, post) params = , body= 的区别
- 使用 request 库发请求
微信小程序退款请求request发送POST流程
1.微信开发者工具前端发送请求
// js
wx.request({
url: '*API地址',
data:{
openid:this.data.openid,
totalPrice:totalPrice,
priceAmount:,
out_trade_no:out_trade_no,
},
success:(res)=>{
console.log(res)
},
complete:(res)=>{
console.log("cancel Quota complete")
},
})
2.API接收参数
# app.py
openid=request.args.get('openid')
totalPrice=int(request.args.get('totalPrice'))
priceAmount = int(request.args.get('priceAmount'))
out_trade_no = request.args.get('out_tr