- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 96 for 400 (0.13 sec)
-
tests/test_tutorial/test_bigger_applications/test_main_an.py
assert response.status_code == 400 assert response.json() == {"detail": "X-Token header invalid"} def test_items_bar_with_invalid_token(client: TestClient): response = client.get("/items/bar?token=jessica", headers={"X-Token": "invalid"}) assert response.status_code == 400 assert response.json() == {"detail": "X-Token header invalid"}
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 24.6K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main_an_py39.py
assert response.status_code == 400 assert response.json() == {"detail": "X-Token header invalid"} @needs_py39 def test_items_bar_with_invalid_token(client: TestClient): response = client.get("/items/bar?token=jessica", headers={"X-Token": "invalid"}) assert response.status_code == 400 assert response.json() == {"detail": "X-Token header invalid"}
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 24.9K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
) assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} def test_login_incorrect_username(): response = client.post("/token", data={"username": "foo", "password": "secret"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"}
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 15.4K bytes - Viewed (0) -
docs/em/docs/tutorial/response-status-code.md
* **`300`** & ๐ "โ". ๐จ โฎ๏ธ ๐ซ ๐ ๐ 5๏ธโฃ๐ โ๏ธ 5๏ธโฃ๐ ๐ซ โ๏ธ ๐ช, ๐ `304`, "๐ซ ๐", โ ๐ ๐ซ โ๏ธ 1๏ธโฃ. * **`400`** & ๐ "๐ฉโ๐ป โ" ๐จ. ๐ซ ๐ฅ ๐ ๐ ๐ ๐ฒ โ๏ธ ๐. * ๐ผ `404`, "๐ซ ๐" ๐จ. * ๐ โ โช๏ธโก๏ธ ๐ฉโ๐ป, ๐ ๐ช โ๏ธ `400`. * `500` & ๐ ๐ฝ โ. ๐ ๐ ๐ โ๏ธ ๐ซ ๐. ๐โ ๐ณ ๐ถ โ ๐ ๐ ๐ธ ๐, โ๏ธ ๐ฝ, โซ๏ธ ๐ ๐ ๐จ 1๏ธโฃ ๐ซ ๐ ๐. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3.4K bytes - Viewed (0) -
docs_src/security/tutorial005_an.py
raise HTTPException(status_code=400, detail="Inactive user") return current_user @app.post("/token") async def login_for_access_token( form_data: Annotated[OAuth2PasswordRequestForm, Depends()], ) -> Token: user = authenticate_user(fake_users_db, form_data.username, form_data.password) if not user: raise HTTPException(status_code=400, detail="Incorrect username or password")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 5.3K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b_an.py
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 assert response.json() == {"detail": "Owner error: Rick"} def test_get_item(): response = client.get("/items/portal-gun") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Dec 26 20:37:34 GMT 2023 - 700 bytes - Viewed (0) -
docs_src/dependencies/tutorial008b_an_py39.py
} class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id not in data:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Dec 26 20:37:34 GMT 2023 - 775 bytes - Viewed (0) -
docs/ja/docs/tutorial/handling-errors.md
ใฏใฉใคใขใณใใซไปฅไธใฎใใใชใใจใไผใใๅฟ ่ฆใใใใใใใใพใใ: * ใฏใฉใคใขใณใใซใฏใใฎๆไฝใฎใใใฎๅๅใชๆจฉ้ใใใใพใใใ * ใฏใฉใคใขใณใใฏใใฎใชใฝใผในใซใขใฏใปในใงใใพใใใ * ใฏใฉใคใขใณใใใขใฏใปในใใใใจใใฆใใ้ ็ฎใๅญๅจใใพใใใ * ใชใฉ ใใใใฎๅ ดๅใ้ๅธธใฏ **400**๏ผ400ใใ499๏ผใฎ็ฏๅฒๅ ใฎ **HTTPในใใผใฟในใณใผใ** ใ่ฟใใใจใซใชใใพใใ ใใใฏ200ใฎHTTPในใใผใฟในใณใผใ๏ผ200ใใ299๏ผใซไผผใฆใใพใใใใใใฎใ200ใในใใผใฟในใณใผใใฏใไฝใใใฎๅฝขใงใชใฏใจในใใๆๅใใงใใฃใใใจใๆๅณใใพใใ 400ใฎ็ฏๅฒใซใใในใใผใฟในใณใผใใฏใใฏใฉใคใขใณใใใใฎใจใฉใผใใใฃใใใจใๆๅณใใพใใ **"404 Not Found"** ใฎใจใฉใผ๏ผใใใณใธใงใผใฏ๏ผใ่ฆใใฆใใพใใ๏ผ ## `HTTPException`ใฎไฝฟ็จ
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.8K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py39.py
) assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} @needs_py39 def test_login_incorrect_username(client: TestClient): response = client.post("/token", data={"username": "foo", "password": "secret"}) assert response.status_code == 400, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.3K bytes - Viewed (0) -
docs_src/security/tutorial004.py
raise credentials_exception return user async def get_current_active_user(current_user: User = Depends(get_current_user)): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user") return current_user @app.post("/token") async def login_for_access_token( form_data: OAuth2PasswordRequestForm = Depends(), ) -> Token:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 4K bytes - Viewed (0)