ycdemo / fastapi / docs_src/ custom_response/ tutorial005_py310.py
from fastapi import FastAPI
from fastapi.responses import PlainTextResponse
app = FastAPI()
@app.get("/", response_class=PlainTextResponse)
async def main():
return "Hello World"