Coverage for docs_src / custom_response / tutorial002_py310.py: 100%
6 statements
« prev ^ index » next coverage.py v7.13.3, created at 2026-04-06 01:24 +0000
« prev ^ index » next coverage.py v7.13.3, created at 2026-04-06 01:24 +0000
1from fastapi import FastAPI 1abcdef
2from fastapi.responses import HTMLResponse 1abcdef
4app = FastAPI() 1abcdef
7@app.get("/items/", response_class=HTMLResponse) 1abcdef
8async def read_items(): 1abcdef
9 return """ 1ghij
10 <html>
11 <head>
12 <title>Some HTML in here</title>
13 </head>
14 <body>
15 <h1>Look ma! HTML!</h1>
16 </body>
17 </html>
18 """