Echoes back everything the server received
https://api.testingapis.com/api/echo/{path}Echoes back everything the server received: method, URL, query, headers, cookies, body and client info.
Accepts GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS on /api/echo and on any sub-path (/api/echo/{**path}); the sub-path is returned as subPath. Up to 1MB of body is echoed (UTF-8 text, or base64 for binary); larger bodies are counted in contentLength and flagged with bodyTruncated. JSON bodies are also returned parsed in json (or jsonError when malformed), and form bodies as form fields plus files metadata. Example: POST /api/echo/orders/7?tag=a&tag=b with a JSON body.
Parameters 1
| Name | Type | Description |
|---|---|---|
pathrequired | path · string |
Request body
Optional. application/json. Any body; it is echoed back.
{"hello": "world"}Responses
- 200
- The request as the server saw it (HEAD responses carry headers only).
Example
curl -X POST "https://api.testingapis.com/api/echo/orders/42" \
-H "Content-Type: application/json" \
-d '{"hello": "world"}'{
"method": "POST",
"url": "https://api.testingapis.com/api/echo/orders/42",
"path": "/api/echo/orders/42",
"subPath": "orders/42",
"queryString": "",
"query": {},
"headers": {
"Accept": "*/*",
"Connection": "keep-alive",
"Host": "api.testingapis.com",
"User-Agent": "python-requests/2.33.1",
"Accept-Encoding": "gzip, deflate, zstd",
"Content-Type": "application/json",
… (18 more lines)