]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Update includes in `docs/en/docs/advanced/response-headers.md` (#12805)
authorZhaohan Dong <65422392+zhaohan-dong@users.noreply.github.com>
Sat, 9 Nov 2024 12:14:09 +0000 (12:14 +0000)
committerGitHub <noreply@github.com>
Sat, 9 Nov 2024 12:14:09 +0000 (12:14 +0000)
docs/en/docs/advanced/response-headers.md

index 80c10082635b511d6746585309323ac6e2633eb0..fca641d89cdf337fa2223b342bc2d5e501533613 100644 (file)
@@ -6,9 +6,7 @@ You can declare a parameter of type `Response` in your *path operation function*
 
 And then you can set headers in that *temporal* response object.
 
-```Python hl_lines="1  7-8"
-{!../../docs_src/response_headers/tutorial002.py!}
-```
+{* ../../docs_src/response_headers/tutorial002.py hl[1, 7:8] *}
 
 And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
 
@@ -24,9 +22,7 @@ You can also add headers when you return a `Response` directly.
 
 Create a response as described in [Return a Response Directly](response-directly.md){.internal-link target=_blank} and pass the headers as an additional parameter:
 
-```Python hl_lines="10-12"
-{!../../docs_src/response_headers/tutorial001.py!}
-```
+{* ../../docs_src/response_headers/tutorial001.py hl[10:12] *}
 
 /// note | "Technical Details"