fetch('/abc/123',{
method:'delete'
}).then(data => {
return data.text();
}).then(ret => {
//这里才是得到的最终数据
console.log(ret);
})
//后台接收参数为req.params.id
fetch_delete请求方式的参数传递
最新推荐文章于 2023-06-06 16:52:26 发布
fetch('/abc/123',{
method:'delete'
}).then(data => {
return data.text();
}).then(ret => {
//这里才是得到的最终数据
console.log(ret);
})
//后台接收参数为req.params.id