Browse Source

📝 Update source example to not use ORJSON

pull/14962/head
Sebastián Ramírez 5 months ago
parent
commit
4d9984937d
  1. 6
      docs_src/custom_response/tutorial010_py310.py

6
docs_src/custom_response/tutorial010_py310.py

@ -1,9 +1,9 @@
from fastapi import FastAPI
from fastapi.responses import ORJSONResponse
from fastapi.responses import HTMLResponse
app = FastAPI(default_response_class=ORJSONResponse)
app = FastAPI(default_response_class=HTMLResponse)
@app.get("/items/")
async def read_items():
return [{"item_id": "Foo"}]
return "<h1>Items</h1><p>This is a list of items.</p>"

Loading…
Cancel
Save