ajax中的put请求和post请求传data值的区别


put请求可以传对象

let amount= {
expenseAccountId:this.id,
dressBaseList:[{
purchasePrice:this.changeReimbursement,
sampleDressId:params.row.sampleDressId
}]

post或get请求必须转换为字符串类型

let amount= {
expenseAccountId:this.id,
dressBaseList:[{
purchasePrice:this.changeReimbursement,
sampleDressId:params.row.sampleDressId
}]
 
let data=JSON.stringify(amount)
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM