If the action cannot be carried out immediately, the server SHOULD respond with a 202 (Accepted) response instead. The origin server MUST create the resource before returning the 201 status code. The newly created resource can be referenced by the URI(s) returned in the entity of the response, with the most specific URI for the resource given by a Location header field. There may also be times when a new resource is created as a result of some controller action, in which case 201 would also be an appropriate response. TRACE an entity containing the request message as received by the end server.Ī REST API responds with the 201 status code whenever a resource is created inside a collection.POST an entity describing or containing the result of the action.HEAD the entity-header fields corresponding to the requested resource are sent in the response without any message-body.GET an entity corresponding to the requested resource is sent in the response.The information returned with the response is dependent on the method used in the request, for example: Unlike the 204 status code, a 200 response should include a response body. It indicates that the REST API successfully carried out whatever action the client requested and that no more specific code in the 2xx series is appropriate. Indicates that the client needs to authenticate to gain network access.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |