vue请求delete接口的时候报The DELETE method is not supported for this route. Supported methods: GET, HEAD, PO
在用vue的axios请求delete接口的时候报The DELETE method is not supported for this route. Supported methods: GET, HEAD, POST,如下:vue中的代码如下:axios.delete('http://blog.test/api/type',{'id':id}).then(response => (con
·
- 在用vue的
axios
请求delete
接口的时候报The DELETE method is not supported for this route. Supported methods: GET, HEAD, POST
,如下:
- vue中的代码如下:
axios.delete('http://blog.test/api/type',{'id':id}).then(response => (console.log(response)))
- 解决办法为: 修改一下传参的方式即可
axios.delete('http://blog.test/api/type/' + id).then(response => (console.log(response)))
更多推荐
已为社区贡献6条内容
所有评论(0)