This topic is important to me because I want to learn how to implement a persistent storage app.
Building A REST API with Node,Express,and Mongo.
HTTP Status Codes is from 100-600 that is part of a HTTP response. The first digit defines the class of the status. Understanding the class behind a code helps us locate problems.
100-199: Informational status codes, usually tell the client that the header part of the request has been received and the server will try to comply wit ha transmission demand of the client.
200-299: Success Codes.
300-399: Redirection Codes, they tell the client that the resource they are requesting isn’t available at the expected location anymore.
400-499: Client Error Codes, all about invalid requests a client sent to a server.
500-599: Server Error Codes, Overwhelmed server, or unreachable servers.
Anything above 599 is a custom class but aren’t permitted but people use them anyways. (beware)
CRUD (Create, Read, Update, Delete)
They make up the lions-share of API endpoints.
Create implemented via HTTP’s post method, used to create new resources or access tokens.
Read Get method, and used to fetch resource representations.
Update Put or Patch method, PUT requires the client to send an entire representation of a resource to update it. (Replace the old one with the new one).
PATCH requires the client only send parts of the representation of the resource to update it. (Add, update or delete these parts in the old version).
Delete delete method from http, to delete…
100’s = 200’s = 300’s = 400’s = 500’s =
Below 100’s =Used to inform the request has been received. 200’s = Used to tell you your request succeeded. 300’s = To tell you the request is redirected, and to use a different location. 400’s = This is given when the client makes a mistake, usually wrong URI or missing auth. 500’s = This is a server issue, usually with a bad link, or unreachable.
I want to understand more about building fullstack applications.
I want to understand all the different status codes for REST Methods so I can debug my code and understand what’s going on.