FastAPI - Echo GET - Query Parameters
examples/fastapi/echo-get/main.py
from fastapi import FastAPI app = FastAPI() @app.get("/") async def root(text): return {"message": f"You wrote: '{text}'"}
http://localhost:8000/?text=Foo%20Bar
from fastapi import FastAPI app = FastAPI() @app.get("/") async def root(text): return {"message": f"You wrote: '{text}'"}
http://localhost:8000/?text=Foo%20Bar