Http methods are kind of request we made to the server.

We are most going to use 4 for our system. They are GET, POST, DELETE & PUT

GET – This is for getting data from server
like – We can get a anime list from server
in express js we use app.get for this type request.

POST – This method is for sending something to server.
Like – We can send form data to server
in express js we use to this type request.

DELETE – This method is delete something in server
Like – we can delete a anime from the list
in express js we use app.delete to this type request.

PUT – This is for updating something
like – we can update an anime name, for mis-spell
in express js we use app.put to this type request.

REST API use this HTTP protocol to send data over computers.

So we already wrote REST API by using app.get,, app.delete & app.put

Did you learn something new today ?

Leave a Reply

Your email address will not be published. Required fields are marked *