- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 47 for OK (0.42 sec)
-
tests/test_custom_middleware_exception.py
wrapper = self.receive_wrapper(receive) await self.app(scope, wrapper, send) @router.post("/middleware") def run_middleware(file: UploadFile = File(..., description="Big File")): return {"message": "OK"} app.include_router(router) app.add_middleware(ContentSizeLimitMiddleware, max_content_size=2**8) client = TestClient(app) def test_custom_middleware_exception(tmp_path: Path):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Aug 25 21:44:40 GMT 2022 - 2.8K bytes - Viewed (0) -
docs/de/docs/advanced/additional-status-codes.md
Angenommen, Sie möchten eine *Pfadoperation* haben, die das Aktualisieren von Artikeln ermöglicht und bei Erfolg den HTTP-Statuscode 200 „OK“ zurückgibt. Sie möchten aber auch, dass sie neue Artikel akzeptiert. Und wenn die Elemente vorher nicht vorhanden waren, werden diese Elemente erstellt und der HTTP-Statuscode 201 „Created“ zurückgegeben.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 23 13:04:57 GMT 2024 - 3K bytes - Viewed (0) -
docs/de/docs/reference/status.md
```python from fastapi import status ``` `status` wird direkt von Starlette bereitgestellt. Es enthält eine Gruppe benannter Konstanten (Variablen) mit ganzzahligen Statuscodes. Zum Beispiel: * 200: `status.HTTP_200_OK` * 403: `status.HTTP_403_FORBIDDEN` * usw.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:17:17 GMT 2024 - 934 bytes - Viewed (0) -
docs/en/docs/reference/status.md
```python from fastapi import status ``` `status` is provided directly by Starlette. It contains a group of named constants (variables) with integer status codes. For example: * 200: `status.HTTP_200_OK` * 403: `status.HTTP_403_FORBIDDEN` * etc. It can be convenient to quickly access HTTP (and WebSocket) status codes in your app, using autocompletion for the name without having to remember the integer status codes by memory.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 871 bytes - Viewed (0) -
tests/test_tutorial/test_cors/test_tutorial001.py
"Access-Control-Request-Headers": "X-Example", } response = client.options("/", headers=headers) assert response.status_code == 200, response.text assert response.text == "OK" assert ( response.headers["access-control-allow-origin"] == "https://localhost.tiangolo.com" ) assert response.headers["access-control-allow-headers"] == "X-Example"
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jul 09 18:06:12 GMT 2020 - 1.2K bytes - Viewed (0) -
docs/de/docs/advanced/response-change-status-code.md
In manchen Fällen müssen Sie jedoch einen anderen als den Standard-Statuscode zurückgeben. ## Anwendungsfall Stellen Sie sich zum Beispiel vor, Sie möchten standardmäßig den HTTP-Statuscode „OK“ `200` zurückgeben. Wenn die Daten jedoch nicht vorhanden waren, möchten Sie diese erstellen und den HTTP-Statuscode „CREATED“ `201` zurückgeben.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:18:58 GMT 2024 - 1.8K bytes - Viewed (0) -
docs/en/docs/advanced/response-change-status-code.md
But in some cases you need to return a different status code than the default. ## Use case For example, imagine that you want to return an HTTP status code of "OK" `200` by default. But if the data didn't exist, you want to create it, and return an HTTP status code of "CREATED" `201`. But you still want to be able to filter and convert the data you return with a `response_model`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 1.5K bytes - Viewed (0) -
docs/es/docs/advanced/response-change-status-code.md
Pero en algunos casos necesitas retornar un status code diferente al predeterminado. ## Casos de uso Por ejemplo, imagina que quieres retornar un HTTP status code de "OK" `200` por defecto. Pero si los datos no existen, quieres crearlos y retornar un HTTP status code de "CREATED" `201`. Pero aún quieres poder filtrar y convertir los datos que retornas con un `response_model`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Feb 06 19:56:23 GMT 2024 - 1.6K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005.py
response = client.get( "/status/", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text assert response.json() == {"status": "ok"} def test_read_system_status_no_token(): response = client.get("/status/") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"}
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/en/docs/advanced/additional-status-codes.md
For example, let's say that you want to have a *path operation* that allows to update items, and returns HTTP status codes of 200 "OK" when successful. But you also want it to accept new items. And when the items didn't exist before, it creates them, and returns an HTTP status code of 201 "Created".
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 2.6K bytes - Viewed (0)