Sending Data in Request Body & File Uploads
What Is a Request Body?
The request body is the part of an HTTP request used to send data to the server, commonly used with methods like POST and PUT to create or update resources.
Common Request Body Formats
| Format | Description |
|---|---|
| JSON | The most common format for sending structured data to modern APIs |
| form-data | Used for sending key-value pairs, including files |
| x-www-form-urlencoded | Encodes data as URL-style key-value pairs |
| raw | Sends plain text, XML, or other raw content formats |
Sending File Uploads
To upload a file, select the form-data option in the Body tab, set the key type to "File," and choose the file from your computer - Postman will then include it as part of the request when sent.
Verifying the Request
After sending a request with a body or file, checking the response status and content helps confirm that the server received and processed the data correctly.
With these final pieces - importing APIs and sending data through the request body - you now have a well-rounded foundation for testing and working with APIs confidently in Postman.
Ready to master Postman API Testing Course?
Join Uncodemy's hands-on training and build real-world API testing skills with expert mentors.