mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-12 13:36:41 +00:00
📝 fix URL examples in Tutorial: Query Parameters (#157)
* modify tutorial * modify item_id
This commit is contained in:
parent
361fd00777
commit
29a4f90bcd
1 changed files with 5 additions and 5 deletions
|
|
@ -81,31 +81,31 @@ You can also declare `bool` types, and they will be converted:
|
||||||
In this case, if you go to:
|
In this case, if you go to:
|
||||||
|
|
||||||
```
|
```
|
||||||
http://127.0.0.1:8000/items/?short=1
|
http://127.0.0.1:8000/items/foo?short=1
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```
|
```
|
||||||
http://127.0.0.1:8000/items/?short=True
|
http://127.0.0.1:8000/items/foo?short=True
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```
|
```
|
||||||
http://127.0.0.1:8000/items/?short=true
|
http://127.0.0.1:8000/items/foo?short=true
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```
|
```
|
||||||
http://127.0.0.1:8000/items/?short=on
|
http://127.0.0.1:8000/items/foo?short=on
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```
|
```
|
||||||
http://127.0.0.1:8000/items/?short=yes
|
http://127.0.0.1:8000/items/foo?short=yes
|
||||||
```
|
```
|
||||||
|
|
||||||
or any other case variation (uppercase, first letter in uppercase, etc), your function will see the parameter `short` with a `bool` value of `True`. Otherwise as `False`.
|
or any other case variation (uppercase, first letter in uppercase, etc), your function will see the parameter `short` with a `bool` value of `True`. Otherwise as `False`.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue