I assume the response code 200 always allows for a response-body, but I can't find any explicit mention of response-bodies for DELETE-requests.
相关问题
- Angular RxJS mergeMap types
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
- Google Apps Script: testing doPost() with cURL
相关文章
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- Is a unicode user agent legal inside an HTTP heade
- Got ActiveRecord::AssociationTypeMismatch on model
- Multiple parameters in AngularJS $resource GET
- git: retry if http request failed
- Flutter - http.get fails on macos build target: Co
- Global Exception Handling in Jersey & Spring?
- REST search interface and the idempotency of GET
It is explicitly mentioned here in the RFC
The short answer is:
You should include a response body with an entity describing the deleted item/resource if you return 200.
202 is something like an asynchronous request/response return status.
204 says explicitly that you do not include a response body
Yes, you should usually respond with a 200 response code as per the W3C spec: