Browse Source

📝 Update includes in `docs/en/docs/tutorial/response-status-code.md` (#12620)

pull/12688/head
Quentin Takeda 5 months ago
committed by GitHub
parent
commit
26702a6525
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      docs/en/docs/tutorial/response-status-code.md

12
docs/en/docs/tutorial/response-status-code.md

@ -8,9 +8,7 @@ The same way you can specify a response model, you can also declare the HTTP sta
* `@app.delete()` * `@app.delete()`
* etc. * etc.
```Python hl_lines="6" {* ../../docs_src/response_status_code/tutorial001.py hl[6] *}
{!../../docs_src/response_status_code/tutorial001.py!}
```
/// note /// note
@ -76,9 +74,7 @@ To know more about each status code and which code is for what, check the <a hre
Let's see the previous example again: Let's see the previous example again:
```Python hl_lines="6" {* ../../docs_src/response_status_code/tutorial001.py hl[6] *}
{!../../docs_src/response_status_code/tutorial001.py!}
```
`201` is the status code for "Created". `201` is the status code for "Created".
@ -86,9 +82,7 @@ But you don't have to memorize what each of these codes mean.
You can use the convenience variables from `fastapi.status`. You can use the convenience variables from `fastapi.status`.
```Python hl_lines="1 6" {* ../../docs_src/response_status_code/tutorial002.py hl[1,6] *}
{!../../docs_src/response_status_code/tutorial002.py!}
```
They are just a convenience, they hold the same number, but that way you can use the editor's autocomplete to find them: They are just a convenience, they hold the same number, but that way you can use the editor's autocomplete to find them:

Loading…
Cancel
Save