Back to All Questions
Question 49 of 100
Intermediate API Testing
Intermediate
Q49: What are the Ways to Send Request Data in Postman?
📊Core Concept
What are the Ways to Send Request Data in Postman?
Key Takeaways & Architecture Summary
- ✓form-data: Key-value data supporting binary file uploads.
- ✓x-www-form-urlencoded: URL-encoded key-value strings (form submissions).
- ✓raw: Raw payloads (JSON, XML, text, HTML) with specific Content-Types.
- ✓binary: Direct file streams sent as the body payload.
Direct Answer Summary
Postman supports multiple request body formats: `form-data` (for mixed key-value strings and binary file uploads), `x-www-form-urlencoded` (url-encoded forms), `raw` (for text, JSON, or XML payloads), and `binary` (for direct file streams like images or PDFs).
⚠️ Senior Engineering Warning (Red Flag)
Avoid utilizing form-data for JSON payloads. JSON payloads require the raw option with a Content-Type header of application/json; using form-data instead can cause parsing failures.
💡 STAR Architectural Explanation & Pro Tip
Selecting the correct body format informs the client to set the correct `Content-Type` header, ensuring the server applies the correct deserializer to process the payload.
RestAssuredTest.java
Rest-Assured + Java// Raw JSON configuration in Postman Request Body
// Content-Type: application/json
{
"email": "dev@careerraah.com",
"resumeAttached": true
}