final html test
Browse files
app.py
CHANGED
|
@@ -4,7 +4,15 @@ from fastapi.responses import HTMLResponse
|
|
| 4 |
app = FastAPI()
|
| 5 |
|
| 6 |
@app.get("/", response_class=HTMLResponse)
|
| 7 |
-
async def
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
return HTMLResponse(content=html_content, status_code=200)
|
|
|
|
| 4 |
app = FastAPI()
|
| 5 |
|
| 6 |
@app.get("/", response_class=HTMLResponse)
|
| 7 |
+
async def read_items():
|
| 8 |
+
html_content = """
|
| 9 |
+
<html>
|
| 10 |
+
<head>
|
| 11 |
+
<title>Some HTML in here</title>
|
| 12 |
+
</head>
|
| 13 |
+
<body>
|
| 14 |
+
<h1>Look ma! HTML!</h1>
|
| 15 |
+
</body>
|
| 16 |
+
</html>
|
| 17 |
+
"""
|
| 18 |
return HTMLResponse(content=html_content, status_code=200)
|