The Methodology of API Methods
GET
GET is how the data is accessed from the API, by using GET, you are going into the server and pulling the data from it. An example would be the GET used in the blog data website, where I used GET to access the data from this very site.
POST
POST is how new data is created, by using POST, you add on an entire new set of data to the API. An example would be creating an entirely new blog within this website.
PATCH
PATCH is the method that updates existing data. By using PATCH, you take a chunk of data that has already been created and changing a part of it. An example, would be adding a new paragraph of content to a blog created a few days ago.
DELETE
DELETE entirely removes an existing chunk of data. It removes the data from the server completely. An example would be deleting an old blog post that may be outdated or incorrect.
These methods, when put together properly, are how a developer is able to manipulate a database.
Comments
Log in to leave a comment.
