Manipulating API calls
Before we get started, we need to understand the basic HTTP methods that we can use to manipulate API calls. HTTP request methods are essentially an action that you would like to execute on the target API. Commonly known as HTTP verbs, these methods can allow us to put data and retrieve data or information from the target resources. The next section will briefly talk about those methods.
The GET
method requests resources from a specific address. Requests using GET
should only retrieve data. The HEAD
method asks for an acknowledgment equal to a GET
request, only without the acknowledgment body. The DELETE
method is used to delete a specified resource. The POST
method is used to submit data to the target resource – typically, you see POST
methods used to post data and cause issues. The PUT
method is used to PUT data on the target server.
Now that we understand what HTTP methods are and how they work, let's see them in action. ...