Skip to content

Commit 3ba1e51

Browse files
committedMar 3, 2023
feat: add post route to call hello_message
1 parent d9694db commit 3ba1e51

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎api/index.py

+4
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ async def root():
1010
@app.get("/hello/{name}")
1111
async def say_hello(name: str):
1212
return {"message": f"Hello {name}"}
13+
14+
@app.post("/hello")
15+
async def hello_message(message: str):
16+
return {"message": f"Hello {message}"}

0 commit comments

Comments
 (0)