Request Body
Send data in POST, PUT, and PATCH requests using JSON, form-data, or binary content.
The request body contains data sent to the server. It is used with POST, PUT, and PATCH methods. Select the appropriate Content-Type for your data format.
Content Types
| Content-Type | Use Case |
|---|---|
| application/json | JSON payload (most common) |
| application/xml | XML payload |
| application/x-www-form-urlencoded | Form data encoded in URL format |
| text/plain | Raw text content |
Writing JSON Body
The Body tab includes a Monaco editor with syntax highlighting, auto-completion, and validation for JSON.
- Beautify — Format and indent your JSON
- Clear — Clear the body content
- Upload File — Load body content from a file
- Use
{{variable_name}}to reference environment variables
Sending a POST Request
- Select POST as the HTTP method
- Switch to the Body tab
- Select application/json as Content-Type
- Write your JSON payload
- Click Send
Example — Create a post on JSONPlaceholder:
json
{
"title": "foo",
"body": "bar",
"userId": 1
} Code Examples
curl
curl -X POST "https://jsonplaceholder.typicode.com/posts" \
-H "Content-Type: application/json" \
-d '{"title":"foo","body":"bar","userId":1}' javascript
fetch("https://jsonplaceholder.typicode.com/posts", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ title: "foo", body: "bar", userId: 1 })
}) On this page
Racoon