Recall & Review
beginner
What is a form-data body in API testing?
Form-data body is a way to send key-value pairs in an HTTP request, often used to upload files or submit form fields in API testing.
Click to reveal answer
beginner
How do you add a file in the form-data body using Postman?
In Postman, select 'form-data' in the Body tab, add a key, then choose 'File' type from the dropdown next to the key, and upload your file.
Click to reveal answer
intermediate
Why use form-data body instead of raw JSON in API requests?
Form-data is used when you need to send files or mixed data types, while raw JSON is for structured text data only.
Click to reveal answer
intermediate
What content-type header does Postman set automatically when using form-data body?
Postman sets the 'Content-Type' header to 'multipart/form-data' with a boundary string automatically when you use form-data body.
Click to reveal answer
beginner
Can you send multiple files in one form-data body in Postman?
Yes, you can add multiple keys with type 'File' in form-data to send multiple files in one request.
Click to reveal answer
What type of data is best sent using form-data body?
✗ Incorrect
Form-data body is designed to send files and key-value pairs together.
In Postman, which tab do you select to send form-data?
✗ Incorrect
The Body tab is where you select form-data to send key-value pairs or files.
What content-type header does Postman add for form-data requests?
✗ Incorrect
Postman sets 'multipart/form-data' for form-data body requests.
Can you send text fields along with files in form-data body?
✗ Incorrect
Form-data supports sending both text fields and files together.
Which of these is NOT a valid use of form-data body?
✗ Incorrect
Login credentials are usually sent as JSON or form-urlencoded, not form-data.
Explain how to send a file and a text field together using form-data body in Postman.
Think about the steps in Postman interface to add different types of data.
You got /6 concepts.
Describe why and when you would use form-data body instead of raw JSON in API testing.
Consider what JSON cannot handle well compared to form-data.
You got /4 concepts.