Skip to content

Commit cd33e2b

Browse files
committed
Note about JSON payloads
1 parent dc3973d commit cd33e2b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,27 @@ With docker compose, this would be:
8686
- "8443:443"
8787

8888

89+
## JSON payloads and JSON output
90+
91+
If you submit a JSON payload in the body of the request, with Content-Type: application/json, then the response will contain the escaped JSON as well.
92+
93+
For example,
94+
95+
curl -X POST -H "Content-Type: application/json" -d '{"a":"b"}' http://localhost:8080/
96+
97+
Will contain a `json` property in the response/output.
98+
99+
...
100+
"xhr": false,
101+
"connection": {},
102+
"json": {
103+
"a": "b"
104+
}
105+
}
106+
107+
108+
109+
89110
## Output
90111

91112
#### Curl output

0 commit comments

Comments
 (0)