- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 156 for 404 (0.17 sec)
-
docs_src/dependencies/tutorial008b_an_py39.py
@app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id not in data: raise HTTPException(status_code=404, detail="Item not found") item = data[item_id] if item["owner"] != username: raise OwnerError(username)
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Dec 26 20:37:34 GMT 2023 - 775 bytes - Viewed (0) -
docs_src/additional_responses/tutorial004.py
from typing import Union from fastapi import FastAPI from fastapi.responses import FileResponse from pydantic import BaseModel class Item(BaseModel): id: str value: str responses = { 404: {"description": "Item not found"}, 302: {"description": "The item was moved"}, 403: {"description": "Not enough privileges"}, } app = FastAPI() @app.get( "/items/{item_id}",
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 701 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d.py
raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException( status_code=404, detail="Item not found, there's only a plumbus here" )
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 694 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an.py
raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException( status_code=404, detail="Item not found, there's only a plumbus here" )
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 744 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an_py39.py
raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException( status_code=404, detail="Item not found, there's only a plumbus here" )
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 734 bytes - Viewed (0) -
tests/test_router_redirect_slashes.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Jun 22 10:37:50 GMT 2023 - 974 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b.py
from fastapi.testclient import TestClient from docs_src.dependencies.tutorial008b import app client = TestClient(app) def test_get_no_item(): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found"} def test_owner_error(): response = client.get("/items/plumbus") assert response.status_code == 400, response.text
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Dec 26 20:37:34 GMT 2023 - 697 bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/thumbnail/ThumbnailAction.java
// 404 throw responseManager.new404("Thumbnail for " + form.docId + " is not found."); } final File thumbnailFile = thumbnailManager.getThumbnailFile(doc); if (thumbnailFile == null) { if (fessConfig.isThumbnailEnabled()) { thumbnailManager.offer(doc); } // 404
Java - Registered: Mon Apr 22 08:04:10 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 3.6K bytes - Viewed (0) -
docs/fr/docs/advanced/additional-responses.md
**FastAPI** prendra ce modèle, générera son schéma JSON et l'inclura au bon endroit dans OpenAPI. Par exemple, pour déclarer une autre réponse avec un code HTTP `404` et un modèle Pydantic `Message`, vous pouvez écrire : ```Python hl_lines="18 22" {!../../../docs_src/additional_responses/tutorial001.py!} ``` !!! note "Remarque"
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 9.6K bytes - Viewed (0) -
docs/em/docs/advanced/additional-responses.md
🔠 👈 📨 `dict`Ⓜ 💪 ✔️ 🔑 `model`, ⚗ Pydantic 🏷, 💖 `response_model`. **FastAPI** 🔜 ✊ 👈 🏷, 🏗 🚮 🎻 🔗 & 🔌 ⚫️ ☑ 🥉 🗄. 🖼, 📣 ➕1️⃣ 📨 ⏮️ 👔 📟 `404` & Pydantic 🏷 `Message`, 👆 💪 ✍: ```Python hl_lines="18 22" {!../../../docs_src/additional_responses/tutorial001.py!} ``` !!! note ✔️ 🤯 👈 👆 ✔️ 📨 `JSONResponse` 🔗. !!! info
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 7.9K bytes - Viewed (0)