Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 166 for Weaver (0.17 sec)

  1. docs/en/docs/how-to/custom-request-and-route.md

    First, we create a `GzipRequest` class, which will overwrite the `Request.body()` method to decompress the body in the presence of an appropriate header.
    
    If there's no `gzip` in the header, it will not try to decompress the body.
    
    That way, the same route class can handle gzip compressed or uncompressed requests.
    
    ```Python hl_lines="8-15"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_header_params/test_tutorial003_an.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.header_params.tutorial003_an import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"X-Token values": None}),
            ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}),
            # TODO: fix this, is it a bug?
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/security/index.md

        * Параметров запроса.
        * Заголовка.
        * Cookies.
    * `http`: стандартные системы аутентификации по протоколу HTTP, включая:
        * `bearer`: заголовок `Authorization` со значением `Bearer {уникальный токен}`. Это унаследовано от OAuth2.
        * Базовая аутентификация по протоколу HTTP.
        * HTTP Digest и т.д.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Aug 02 15:14:19 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  4. docs/fa/docs/tutorial/security/index.md

    * شیوه `apiKey`: یک کلید اختصاصی برای برنامه که می‌تواند از موارد زیر استفاده شود:
        * پارامتر جستجو.
        * هدر.
        * کوکی.
    * شیوه `http`: سیستم‌های استاندارد احراز هویت HTTP، از جمله:
        * مقدار `bearer`: یک هدر `Authorization` با مقدار `Bearer` به همراه یک توکن. این از OAuth2 به ارث برده شده است.
        * احراز هویت پایه HTTP.
        * ویژگی HTTP Digest و غیره.
    * شیوه `oauth2`: تمام روش‌های OAuth2 برای مدیریت امنیت (به نام "flows").
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 23 15:06:11 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  5. tests/test_starlette_exception.py

    @app.get("/items/{item_id}")
    async def read_item(item_id: str):
        if item_id not in items:
            raise HTTPException(
                status_code=404,
                detail="Item not found",
                headers={"X-Error": "Some custom header"},
            )
        return {"item": items[item_id]}
    
    
    @app.get("/http-no-body-statuscode-exception")
    async def no_body_status_code_exception():
        raise HTTPException(status_code=204)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  6. tests/test_ws_router.py

    import functools
    
    import pytest
    from fastapi import (
        APIRouter,
        Depends,
        FastAPI,
        Header,
        WebSocket,
        WebSocketDisconnect,
        status,
    )
    from fastapi.middleware import Middleware
    from fastapi.testclient import TestClient
    
    router = APIRouter()
    prefix_router = APIRouter()
    native_prefix_route = APIRouter(prefix="/native")
    app = FastAPI()
    
    
    @app.websocket_route("/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/security/simple-oauth2.md

        {!> ../../../docs_src/security/tutorial003_py310.py!}
        ```
    
    !!! info
        🌖 🎚 `WWW-Authenticate` ⏮️ 💲 `Bearer` 👥 🛬 📥 🍕 🔌.
    
        🙆 🇺🇸🔍 (❌) 👔 📟 4️⃣0️⃣1️⃣ "⛔" 🤔 📨 `WWW-Authenticate` 🎚.
    
        💼 📨 🤝 (👆 💼), 💲 👈 🎚 🔜 `Bearer`.
    
        👆 💪 🤙 🚶 👈 ➕ 🎚 & ⚫️ 🔜 👷.
    
        ✋️ ⚫️ 🚚 📥 🛠️ ⏮️ 🔧.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/websockets.md

    ## Verwendung von `Depends` und anderen
    
    In WebSocket-Endpunkten können Sie Folgendes aus `fastapi` importieren und verwenden:
    
    * `Depends`
    * `Security`
    * `Cookie`
    * `Header`
    * `Path`
    * `Query`
    
    Diese funktionieren auf die gleiche Weise wie für andere FastAPI-Endpunkte/*Pfadoperationen*:
    
    === "Python 3.10+"
    
        ```Python hl_lines="68-69  82"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:58 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  9. tests/test_security_http_bearer_optional.py

    
    client = TestClient(app)
    
    
    def test_security_http_bearer():
        response = client.get("/users/me", headers={"Authorization": "Bearer foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Bearer", "credentials": "foobar"}
    
    
    def test_security_http_bearer_no_credentials():
        response = client.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  10. docs/em/docs/deployment/server-workers.md

    [19515] [INFO] Booting worker with pid: 19515
    [19511] [INFO] Started server process [19511]
    [19511] [INFO] Waiting for application startup.
    [19511] [INFO] Application startup complete.
    [19513] [INFO] Started server process [19513]
    [19513] [INFO] Waiting for application startup.
    [19513] [INFO] Application startup complete.
    [19514] [INFO] Started server process [19514]
    [19514] [INFO] Waiting for application startup.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.2K bytes
    - Viewed (0)
Back to top