Coverage for docs_src / custom_response / tutorial010_py310.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.13.3, created at 2026-04-06 01:24 +0000

1from fastapi import FastAPI 1abcdefg

2from fastapi.responses import HTMLResponse 1abcdefg

3 

4app = FastAPI(default_response_class=HTMLResponse) 1abcdefg

5 

6 

7@app.get("/items/") 1abcdefg

8async def read_items(): 1abcdefg

9 return "<h1>Items</h1><p>This is a list of items.</p>" 1hijk