You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Request returning _text_ in the response body and [_418 I'm a teapot_](https://save418.com/) in the header's Status Code
156
-
```
157
-
curl -w '\n' -v -H "X-Erised-Status-Code:Teapot" -H "X-Erised-Data:Server refuses to brew coffee because it is, permanently, a teapot." http://localhost:8080
158
-
```
159
-
```sh
160
-
* Trying ::1...
161
-
* TCP_NODELAY set
162
-
* Connected to localhost (::1) port 8080 (#0)
163
-
> GET / HTTP/1.1
164
-
> Host: localhost:8080
165
-
> User-Agent: curl/7.64.1
166
-
> Accept: */*
167
-
> X-Erised-Status-Code:Teapot
168
-
> X-Erised-Data:Server refuses to brew coffee because it is, permanently, a teapot.
169
-
>
170
-
< HTTP/1.1 418 I'm a teapot
171
-
< Content-Encoding: identity
172
-
< Content-Type: text/plain
173
-
< Date: Tue, 29 Dec 2020 18:54:46 GMT
174
-
< Content-Length: 67
175
-
<
176
-
* Connection #0 to host localhost left intact
177
-
Server refuses to brew coffee because it is, permanently, a teapot.
{"timestamp":"2020-12-30T11:21:32.793Z","status":404,"error":"Not Found","message":"Chuck Norris knows everything there is to know - Except where this page is.","path":"/jokes/random"}
288
185
* Closing connection 0
289
186
```
187
+
188
+
# Examples
189
+
### Simple request returning nothing in the response's body:
190
+
```
191
+
curl -w '\n' -v http://localhost:8080
192
+
```
193
+
```sh
194
+
* Trying ::1...
195
+
* TCP_NODELAY set
196
+
* Connected to localhost (::1) port 8080 (#0)
197
+
> GET / HTTP/1.1
198
+
> Host: localhost:8080
199
+
> User-Agent: curl/7.64.1
200
+
> Accept: */*
201
+
>
202
+
< HTTP/1.1 200 OK
203
+
< Content-Encoding: identity
204
+
< Content-Type: text/plain
205
+
< Date: Tue, 29 Dec 2020 18:35:48 GMT
206
+
< Content-Length: 0
207
+
<
208
+
* Connection #0 to host localhost left intact
209
+
210
+
* Closing connection 0
211
+
```
212
+
213
+
### Request returning _Hello World_ in the response's body:
### Request returning _text_ in the response body and [_418 I'm a teapot_](https://save418.com/) in the header's Status Code
265
+
```
266
+
curl -w '\n' -v -H "X-Erised-Status-Code:Teapot" -H "X-Erised-Data:Server refuses to brew coffee because it is, permanently, a teapot." http://localhost:8080
267
+
```
268
+
```sh
269
+
* Trying ::1...
270
+
* TCP_NODELAY set
271
+
* Connected to localhost (::1) port 8080 (#0)
272
+
> GET / HTTP/1.1
273
+
> Host: localhost:8080
274
+
> User-Agent: curl/7.64.1
275
+
> Accept: */*
276
+
> X-Erised-Status-Code:Teapot
277
+
> X-Erised-Data:Server refuses to brew coffee because it is, permanently, a teapot.
278
+
>
279
+
< HTTP/1.1 418 I'm a teapot
280
+
< Content-Encoding: identity
281
+
< Content-Type: text/plain
282
+
< Date: Tue, 29 Dec 2020 18:54:46 GMT
283
+
< Content-Length: 67
284
+
<
285
+
* Connection #0 to host localhost left intact
286
+
Server refuses to brew coffee because it is, permanently, a teapot.
0 commit comments