Merge pull request #24 from simonprickett/patch-2
Formatting fix for creating a customer and minor typo fix.
This commit is contained in:
commit
f178f43fdc
1 changed files with 3 additions and 3 deletions
|
@ -118,11 +118,11 @@ Next, start the server:
|
|||
$ poetry run uvicorn --reload main:test
|
||||
|
||||
Then, in another shell, create a customer:
|
||||
|
||||
```
|
||||
$ curl -X POST "http://localhost:8000/customer" -H 'Content-Type: application/json' -d '{"first_name":"Andrew","last_name":"Brookins","email":"a@example.com","age":"38","join_date":"2020
|
||||
-01-02"}'
|
||||
{"pk":"01FM2G8EP38AVMH7PMTAJ123TA","first_name":"Andrew","last_name":"Brookins","email":"a@example.com","join_date":"2020-01-02","age":38,"bio":""}
|
||||
|
||||
```
|
||||
Get a copy of the value for "pk" and make another request to get that customer:
|
||||
|
||||
$ curl "http://localhost:8000/customer/01FM2G8EP38AVMH7PMTAJ123TA"
|
||||
|
@ -133,7 +133,7 @@ You can also get a list of all customer PKs:
|
|||
$ curl "http://localhost:8000/customers"
|
||||
{"customers":["01FM2G8EP38AVMH7PMTAJ123TA"]}
|
||||
|
||||
## Redsi OM with Asyncio
|
||||
## Redis OM with Asyncio
|
||||
|
||||
Redis OM is designed to work with asyncio, so you can use Redis OM models asynchronously within FastAPI applications.
|
||||
|
||||
|
|
Loading…
Reference in a new issue