We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50c99c8 commit 0ceb234Copy full SHA for 0ceb234
1 file changed
main.py
@@ -2,6 +2,8 @@
2
3
app = FastAPI()
4
5
+fake_item_db = [{"item-name ": "Foo"}, {"item-name ": "Bar"}, {"item-name ": "Daz"}]
6
+
7
8
#! Root Path
9
@app.get("/")
@@ -20,4 +22,8 @@ async def readItem(item_id: int):
20
22
async def readItemName(item_name: str):
21
23
return {"Item Name ": item_name}
24
-#! Query Parameters
25
26
+#! Query Parameters - String eg:- /item?name="{str}"
27
+@app.get("/item")
28
+async def readItemEndpoint(name: str):
29
+ return {"Name": name}
0 commit comments