- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for Wain (0.27 sec)
-
docs_src/advanced_middleware/tutorial002.py
from fastapi.middleware.trustedhost import TrustedHostMiddleware app = FastAPI() app.add_middleware( TrustedHostMiddleware, allowed_hosts=["example.com", "*.example.com"] ) @app.get("/") async def main():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 279 bytes - Viewed (0) -
docs_src/request_files/tutorial002.py
@app.post("/uploadfiles/") async def create_upload_files(files: List[UploadFile]): return {"filenames": [file.filename for file in files]} @app.get("/") async def main(): content = """ <body> <form action="/files/" enctype="multipart/form-data" method="post"> <input name="files" type="file" multiple> <input type="submit"> </form>
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 811 bytes - Viewed (0) -
docs_src/app_testing/tutorial002.py
from fastapi.websockets import WebSocket app = FastAPI() @app.get("/") async def read_main(): return {"msg": "Hello World"} @app.websocket("/ws") async def websocket(websocket: WebSocket): await websocket.accept() await websocket.send_json({"msg": "Hello WebSocket"}) await websocket.close() def test_read_main(): client = TestClient(app) response = client.get("/")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Feb 08 10:23:07 GMT 2023 - 757 bytes - Viewed (0) -
docs_src/behind_a_proxy/tutorial002.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jun 11 21:53:19 GMT 2020 - 208 bytes - Viewed (0)