Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 294 for cookie2 (0.04 sec)

  1. docs_src/cookie_param_models/tutorial002_py39.py

    from typing import Union
    
    from fastapi import Cookie, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Cookies(BaseModel):
        model_config = {"extra": "forbid"}
    
        session_id: str
        fatebook_tracker: Union[str, None] = None
        googall_tracker: Union[str, None] = None
    
    
    @app.get("/items/")
    async def read_items(cookies: Cookies = Cookie()):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 381 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial005.py

                None,
                200,
                {"q_or_cookie": None},
            ),
        ],
    )
    def test_get(path, cookie, expected_status, expected_response, client: TestClient):
        if cookie is not None:
            client.cookies.set("last_query", cookie)
        else:
            client.cookies.clear()
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_response_cookies/test_tutorial001.py

    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.post("/cookie/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Come to the dark side, we have cookies"}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 408 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_response_cookies/test_tutorial002.py

    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.post("/cookie-and-object/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Come to the dark side, we have cookies"}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 419 bytes
    - Viewed (0)
  5. tests/test_query_cookie_header_model_extra_params.py

        client = TestClient(app)
        client.cookies = [
            ("param", "123"),
            ("param2", "456"),  # Pass a list of values as extra parameter
            ("param2", "789"),
        ]
        resp = client.get("/cookie")
        assert resp.status_code == 200
        resp_json = resp.json()
        assert "param2" in resp_json
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  6. tests/test_param_include_in_schema.py

                {"hidden_cookie": "somevalue"},
                200,
                {"hidden_cookie": "somevalue"},
            ),
        ],
    )
    def test_hidden_cookie(path, cookies, expected_status, expected_response):
        client = TestClient(app, cookies=cookies)
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    @pytest.mark.parametrize(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/helper/SearchHelper.java

                final Cookie[] cookies = req.getCookies();
                if (cookies != null) {
                    for (final Cookie cookie : cookies) {
                        if (cookieName.equals(cookie.getName())) {
                            try {
                                final String encoded = cookie.getValue();
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Sat Dec 20 05:56:45 UTC 2025
    - 36.3K bytes
    - Viewed (0)
  8. docs/uk/docs/tutorial/cors.md

    ## Символьне підставляння
    
    Можна також оголосити список як `"*"` ("символьне підставляння"), що означає дозвіл для всіх джерел.
    
    Однак це дозволить лише певні типи комунікації, виключаючи все, що пов'язане з обліковими даними: Cookies, заголовки авторизації, такі як ті, що використовуються з Bearer токенами тощо.
    
    Тому для коректної роботи краще явно вказувати дозволені джерела.
    
    ## Використання `CORSMiddleware`
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri May 30 13:34:34 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  9. docs_src/response_cookies/tutorial001_py39.py

    from fastapi import FastAPI
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    
    @app.post("/cookie/")
    def create_cookie():
        content = {"message": "Come to the dark side, we have cookies"}
        response = JSONResponse(content=content)
        response.set_cookie(key="fakesession", value="fake-cookie-session-value")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 344 bytes
    - Viewed (0)
  10. docs_src/response_cookies/tutorial002_py39.py

    from fastapi import FastAPI, Response
    
    app = FastAPI()
    
    
    @app.post("/cookie-and-object/")
    def create_cookie(response: Response):
        response.set_cookie(key="fakesession", value="fake-cookie-session-value")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 272 bytes
    - Viewed (0)
Back to top