diff --git a/app/main.py b/app/main.py index 6125e30..ba63c8c 100644 --- a/app/main.py +++ b/app/main.py @@ -1,9 +1,11 @@ from typing import Union -from fastapi import FastAPI +from fastapi import FastAPI, Request app = FastAPI() -@app.get("/") -def read_root(): - return {"Hello": "World - 20240202"} \ No newline at end of file + +@app.get("/items/{item_id}") +def read_root(item_id: str, request: Request): + client_host = request.client.host + return {"client_host": client_host, "item_id": item_id} \ No newline at end of file