axios delete请求 参数
内容转载作者:https://www.cnblogs.com/pangguoming/p/8994742.html
如果服务端将参数当做 java对象来封装接收则 参数格式为:{data: param}
1
2
3
4
5
|
var param={name: 'jack' ,age:20} axios . delete ( "/ehrReferralObjPro" , {data: param}) .then( function (response) { } |
如果服务端将参数当做url 参数 接收,则格式为:{params: param},这样发送的url将变为http:www.XXX.com?a=..&b=..
1
2
3
4
5
|
var param={name: 'jack' ,age:20} axios . delete ( "/ehrReferralObjPro" , {params: param}) .then( function (response) { } |