Payload refers to the data transmitted as part of the request. The payloads option appears only for PUT, POST, and DELETE requests. When you create a request, make sure the contains the right parameters. The request is created in a JSON format as shown below:
The following is an example of the JSON format:
{
"name": "John Doe",
"age": 30,
"isStudent": false,
"address": {
"street": "123 Main St",
"city": "Exampleville"
},
"hobbies": ["Reading", "Gardening", "Cooking"]
}
The following are the syntax rules:
- Keys are enclosed in double quotation marks (e.g., "name").
- Values can be strings (in double quotes), numbers, booleans (true or false), null, objects (nested JSON), or arrays (lists of values).
- Commas separate key-value pairs.
- Curly braces {} define objects.
- Square brackets [] define arrays.
Steps to Add a Payload
Follow the steps to add a Query or Path parameter
- In the Request , click the Payload tab.
The Payload tab appears. - Click the icon.
The Parameter Editor pop-up window appears.
- Specify the Name for the Payload.
To add values in the Value textbox, click the button or specify the values in the textbox.
- Click the Add button.
The details are added to the Payloads tab.