HTTP REST Request Action - Request Body
Adding additional details to your HTTP calls
What is Request Body?
To have a big picture on how API works, we first must know how our API requests look like.
In an API call, or a HTTP request, the data is structured to different layers. Each layers coincides with different data used in different stages.
The Request Body, as shown as the Last layer in the diagram above, contains information that will be sent in the packet as the actual data content. The Request Body usually contains the request informations such as filters or field values for a specific object.
How do we know What does the API needs as the Body
Always attempt to refer back to your application's API document is your best bet. A well documented API documentation usually contains a sample call for the API endpoint. In the sample call, look out for the term
--data
This is where the data should be located in the Request body section. Here is an example of Prosperworks API :
Understanding this, you can now easily follow the sample request, and fill in the desired details into the Request Body section. Note that Request Body are usually in JSON format. To learn more about JSON format, check it out here.