From c1e10b56297edae963ad1fc975af294703374489 Mon Sep 17 00:00:00 2001 From: Simon Prickett Date: Thu, 18 Nov 2021 21:41:22 +0000 Subject: [PATCH] Formatting fix for creating a customer and minor typo fix. --- docs/fastapi_integration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/fastapi_integration.md b/docs/fastapi_integration.md index 423263e..8534ddf 100644 --- a/docs/fastapi_integration.md +++ b/docs/fastapi_integration.md @@ -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.