reading-notes

Status Codes Based On REST Methods

In your own words, describe what each group of status code represents:

100’s = These are the informational status codes; They usually tell the client that the main part of the request has been received and the server will attempt to comply with the client’s send request. Like using a different protocol or telling the client that their request will fail before they start sending the text.

What is a status code 202?

Accepted: Often used for asynchronous processing. This code tells the client that the request was valid, but that its processing will finish sometime in the future. The response body should include the URL of the end resource with some information about when it is available, or the URL of some monitoring endpoint that tells the client when the resource is available.

What is a status code 308?

Permanent Redirect: This tells the client to use another URL to access the resource and not to use the current URL anymore. It’s useful when we have multiple endpoints for a single resource, but we don’t want to read from all of them.

What code would you use if an update didn’t return data to a client?

204 No Content

What code would you use if a resource used to exist but no longer does?

414 Request-URI Too Long

What is the ‘Forbidden’ status code?

403 Forbidden: The client has authorized or does not need to authorize itself, but still does not have permission to access the resource.