Skip to content

Commit d370edd

Browse files
committed
Instructions on custom content type
1 parent 346e9ef commit d370edd

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,29 @@ That will cause the reponse status code to be:
152152
HTTP/1.1 401 Unauthorized
153153
```
154154

155+
## Set response Content-Type
156+
157+
Use `x-set-response-content-type` to set the Content-Type of the response.
158+
159+
You can send it as a header:
160+
161+
```bash
162+
curl -H "X-Set-Response-Content-Type: text/plain" -kv https://localhost:8443/
163+
```
164+
165+
You can send it as a querystring parameter:
166+
167+
```bash
168+
curl -kv https://localhost:8443/path?x-set-response-content-type=text/plain
169+
```
170+
171+
This will cause the response content type to be:
172+
173+
```
174+
< Content-Type: text/plain; charset=utf-8
175+
```
176+
177+
155178
## Add a delay before response
156179

157180
Use `x-set-response-delay-ms` to set a custom delay in milliseconds. This will allow you to simulate slow responses.

0 commit comments

Comments
 (0)