What are API methods
I think methods are used to tell an application what it wants to do when communicating with an API or database. Different methods are used for getting, adding, changing, or removing information
I think GET means to get information. I have seen it used to request data from an API or website. For example, an application could use GET to get a list of users.
I think POST means to send or add information. A developer could use POST to create something new, such as adding a new user to a database.
I think PATCH means to make a small change to something that already exists. To "patch" something could mean updating only part of an existing item, such as changing a user's email address.
I think DELETE means to remove something. When this method is used, an item could be deleted from a database, such as removing a user account.
GET, POST, PATCH, and DELETE can work together in one application. GET can retrieve information, POST can create new information, PATCH can update existing information, and DELETE can remove information.
Overall, I understand these four methods as basic ways an application communicates with data: GET gets data, POST creates data, PATCH changes data, and DELETE removes data.
Comments
Log in to leave a comment.
