CNode

求助koa2如何接收delete请求的参数

问答
Ttanyukang发布于7 年前最后回复7 年前1 回复4316 浏览0 收藏

后端代码

router.prefix('/blogType');
router.delete('/', async (ctx)=>{
    ctx.body= '';
})

前端代码

this.axios("delete", "/blogType", {
        data:{
            _id: _id
        }
      })
        .then(res => {
         
        })
      
查看回复

回复 (1)

D
dumplingbao#1·7 年前

打印ctx就知道了,就在里面

参与回复
登录后即可参与回复。登录