In Postman, when sending a request with a form-data body, what is the main purpose of using this type of body?
Think about when you need to upload files or send multiple fields with different types.
Form-data body allows sending key-value pairs where values can be text or files. It is commonly used for file uploads and multipart form submissions.
When you select form-data body in Postman and send a request, what is the Content-Type header automatically set to?
Form-data uses a special content type that includes a boundary string.
Form-data body uses multipart/form-data content type with a boundary string to separate parts of the data.
You want to write a Postman test script to check that the response confirms a file was uploaded successfully. Which assertion is correct?
pm.test('File upload success', () => { pm.response.to.have.status(200); pm.expect(pm.response.json().message).to.eql('File uploaded'); });
Look for the assertion that checks the success message exactly.
The assertion checks that the response JSON message equals 'File uploaded', confirming success.
Given this Postman form-data body setup:
Key: "file" (type: File)
Value: (no file selected)
Why will the request fail to send the file?
Check if the file input has a file selected.
If no file is selected for the file key, the request sends no file data, causing failure.
You want to automate testing of multiple file uploads using Postman Collection Runner. Which approach correctly supports this?
Think about how to parameterize file uploads in automated runs.
Using a CSV file with file paths and referencing variables in form-data allows automated file uploads in Collection Runner.