API Lab · class day 44
POST payloads
Send a JSON body in several ways: text, a Map, a JSONObject, a POJO or a file. The echo address shows what arrived.
Send X-Sandbox: your-name with every request to get your own data. Addresses start with /api/v1 after this site's address.
Addresses for today
| Method | Address | What it does | Status codes |
|---|---|---|---|
| POST | /api/v1/echo{"hello": "world", "list": [1, 2, 3]} | Sends back method, query, headers and body, and the body as JSON when it is JSON | 200 OK, 413 Body too big |
| PUT | /api/v1/echo{"a": 1} | The same as POST: PUT, PATCH and DELETE are echoed too | 200 OK |