{"msg":"Request method 'DELETE' not supported","code":500}
时间: 2023-08-16 18:09:56 浏览: 158
Request Method Not Supported(处理方案).md
根据引用和引用的内容,错误的原因是由于后端代码中的路由方法不支持DELETE请求。要解决这个问题,你需要确保后端代码中的路由方法使用的是正确的HTTP请求方法,对于删除操作应该使用DELETE请求。同时,前端发送请求时也要确保使用了正确的HTTP请求方法,比如在axios请求中使用axios.delete()方法。另外,还需要将参数正确地传递给后端接口,例如在请求中将ID作为参数传递给后端。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *2* [【Request method ‘DELETE‘ not supported】报错的解决方法之一](https://blog.csdn.net/m0_53563908/article/details/126253765)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *3* [“msg“:“Request method ‘GET‘ not supported“,“code“:500原因及解决](https://blog.csdn.net/weixin_45102882/article/details/122336713)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文