Skip to content

Commit 265ad04

Browse files
committed
rename snippets and json samples to have advanced_prefix
1 parent 00ef295 commit 265ad04

9 files changed

+10
-8
lines changed

docs/features/event-handler/rest.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ You can use `app.use` to register middleware that should always run regardless o
206206
=== "index.ts"
207207

208208
```ts hl_lines="8-17"
209-
--8<-- "examples/snippets/event-handler/rest/gettingStarted_global_middleware.ts:3"
209+
--8<-- "examples/snippets/event-handler/rest/advanced_mw_global_middleware.ts:3"
210210
```
211211

212212
#### Route specific middleware
@@ -217,7 +217,7 @@ handler.
217217
=== "index.ts"
218218

219219
```ts hl_lines="9-18 25"
220-
--8<-- "examples/snippets/event-handler/rest/gettingStarted_route_middleware.ts:3"
220+
--8<-- "examples/snippets/event-handler/rest/advanced_mw_route_middleware.ts:3"
221221
```
222222

223223
#### Order of execution
@@ -254,13 +254,13 @@ executes last in post-processing wins.
254254
=== "index.ts"
255255

256256
```ts hl_lines="8-11 13-16 23"
257-
--8<-- "examples/snippets/event-handler/rest/gettingStarted_middleware_order.ts:3"
257+
--8<-- "examples/snippets/event-handler/rest/advanced_mw_middleware_order.ts:3"
258258
```
259259

260260
=== "JSON Response"
261261

262262
```json hl_lines="5"
263-
--8<-- "examples/snippets/event-handler/rest/samples/gettingStarted_middleware_order.json"
263+
--8<-- "examples/snippets/event-handler/rest/samples/advanced_mw_middleware_order.json"
264264
```
265265

266266
#### Returning early
@@ -297,15 +297,17 @@ but the post-processing of already executed middleware will.
297297
=== "index.ts"
298298

299299
```ts hl_lines="12-17"
300-
--8<-- "examples/snippets/event-handler/rest/gettingStarted_early_return.ts:3"
300+
--8<-- "examples/snippets/event-handler/rest/advanced_mw_early_return.ts:3"
301301
```
302302

303303
=== "JSON Response"
304304

305305
```json hl_lines="2"
306-
--8<-- "examples/snippets/event-handler/rest/samples/gettingStarted_early_return.json"
306+
--8<-- "examples/snippets/event-handler/rest/samples/advanced_mw_early_return.json"
307307
```
308308

309+
#### Exception Handling
310+
309311
### Fine grained responses
310312

311313
You can use the Web API's `Response` object to have full control over the response. For
@@ -314,13 +316,13 @@ example, you might want to add additional headers, cookies, or set a custom cont
314316
=== "index.ts"
315317

316318
```ts hl_lines="9-16 21-26"
317-
--8<-- "examples/snippets/event-handler/rest/gettingStarted_fine_grained_responses.ts:3"
319+
--8<-- "examples/snippets/event-handler/rest/advanced_fine_grained_responses.ts:3"
318320
```
319321

320322
=== "JSON Response"
321323

322324
```json hl_lines="4-6"
323-
--8<-- "examples/snippets/event-handler/rest/samples/gettingStarted_fine_grained_responses.json"
325+
--8<-- "examples/snippets/event-handler/rest/samples/advanced_fine_grained_responses.json"
324326
```
325327

326328
### Response streaming
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)