失败的HTTP删除操作的HTTP响应代码是什么? [英] What is the HTTP response code for failed HTTP Delete operation?

查看:604
本文介绍了失败的HTTP删除操作的HTTP响应代码是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个uri / api / books / 122 的资源,如果客户端为此资源发送HTTP删除时该资源不存在,是这个动作的适当响应代码?它是404 Not Found?

谢谢

I have a resources with uri /api/books/122 , if this resource doesn't exist at the point where a client sends HTTP Delete for this resource, what is the appropriate response code from this action? Is it 404 Not Found?
Thanks

推荐答案

是的,它将是404。

一般情况下,如果请求以某种方式出错,则会出现400系列错误;如果服务器出现问题,则会出现500系列错误。

In general it will be a 400 series error if the request is wrong somehow, and a 500 series error if something goes awry on the server.

这篇关于失败的HTTP删除操作的HTTP响应代码是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆