- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for raisin (0.19 sec)
-
docs_src/handling_errors/tutorial002.py
from fastapi import FastAPI, HTTPException app = FastAPI() items = {"foo": "The Foo Wrestlers"} @app.get("/items-header/{item_id}") async def read_item_header(item_id: str): if item_id not in items: raise HTTPException( status_code=404, detail="Item not found", headers={"X-Error": "There goes my error"}, )
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 404 bytes - Viewed (0) -
docs_src/websockets/tutorial002.py
async def get_cookie_or_token( websocket: WebSocket, session: Union[str, None] = Cookie(default=None), token: Union[str, None] = Query(default=None), ): if session is None and token is None: raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION) return session or token @app.websocket("/items/{item_id}/ws") async def websocket_endpoint( websocket: WebSocket, item_id: str,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Nov 13 16:10:54 GMT 2022 - 2.8K bytes - Viewed (0)