Skip to the content.

HTTP Status Codes

really funny website to learn about codes

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

UPDATE An update can be implemented with an HTTP PUT or PATCH method. The difference lies in the amount of data the client has to send to the backend.

PUT requires the client to send an entire representation of a resource to update it.

PATCH requires the client only send parts of the representation of the resource to update it.

DELETE The delete action can be implemented with the HTTP DELETE method.

Middleware :

is software that provides common services and capabilities to applications outside of what’s offered by the operating system.

What does app.use(express.json()) do? express. json() is a method inbuilt in express to recognize the incoming Request Object as a JSON Object. This method is called as a middleware .

What is the difference beween PUT and PATCH?

The main difference between the PUT and PATCH method is that the PUT method uses the request URI to supply a modified version of the requested resource which replaces the original version of the resource, whereas the PATCH method supplies a set of instructions to modify the resource.

What is the difference between a status 200 and a status 201? The 200 status code is by far the most common returned. It means, simply, that the request was received and understood and is being processed. A 201 status code indicates that a request was successful and as a result, a resource has been created (for example a new page).