Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 266 for Cookies (0.06 sec)

  1. okhttp/src/main/kotlin/okhttp3/Cookie.kt

        internal constructor(cookie: Cookie) : this() {
          this.name = cookie.name
          this.value = cookie.value
          this.expiresAt = cookie.expiresAt
          this.domain = cookie.domain
          this.path = cookie.path
          this.secure = cookie.secure
          this.httpOnly = cookie.httpOnly
          this.persistent = cookie.persistent
          this.hostOnly = cookie.hostOnly
          this.sameSite = cookie.sameSite
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:12:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

          if (("Cookie".equals(key, ignoreCase = true) || "Cookie2".equals(key, ignoreCase = true)) &&
            value.isNotEmpty()
          ) {
            for (header in value) {
              if (cookies == null) cookies = mutableListOf()
              cookies.addAll(decodeHeaderAsJavaNetCookies(url, header))
            }
          }
        }
    
        return if (cookies != null) {
          Collections.unmodifiableList(cookies)
        } else {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:10:43 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. docs_src/cookie_param_models/tutorial001_py310.py

    from fastapi import Cookie, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Cookies(BaseModel):
        session_id: str
        fatebook_tracker: str | None = None
        googall_tracker: str | None = None
    
    
    @app.get("/items/")
    async def read_items(cookies: Cookies = Cookie()):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 303 bytes
    - Viewed (0)
  4. docs_src/cookie_param_models/tutorial002_pv1_an_py39.py

    from fastapi import Cookie, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Cookies(BaseModel):
        class 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: Annotated[Cookies, Cookie()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 406 bytes
    - Viewed (0)
  5. docs_src/cookie_param_models/tutorial002_pv1_an.py

    from fastapi import Cookie, FastAPI
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class Cookies(BaseModel):
        class 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: Annotated[Cookies, Cookie()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 435 bytes
    - Viewed (0)
  6. docs_src/cookie_param_models/tutorial002.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 Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 381 bytes
    - Viewed (0)
  7. docs_src/cookie_param_models/tutorial002_an.py

    from fastapi import Cookie, FastAPI
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    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: Annotated[Cookies, Cookie()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 431 bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http/BridgeInterceptor.kt

        }
    
        return responseBuilder.build()
      }
    
      /** Returns a 'Cookie' HTTP request header with all cookies, like `a=b; c=d`. */
      private fun cookieHeader(cookies: List<Cookie>): String =
        buildString {
          cookies.forEachIndexed { index, cookie ->
            if (index > 0) append("; ")
            append(cookie.name).append('=').append(cookie.value)
          }
        }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_cookie_param_models/test_tutorial002.py

        client = TestClient(mod.app)
        return client
    
    
    def test_cookie_param_model(client: TestClient):
        with client as c:
            c.cookies.set("session_id", "123")
            c.cookies.set("fatebook_tracker", "456")
            c.cookies.set("googall_tracker", "789")
            response = c.get("/items/")
        assert response.status_code == 200
        assert response.json() == {
            "session_id": "123",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/cookie-params.md

    ////
    
    /// note | "Технические детали"
    
    `Cookie` - это класс, родственный `Path` и `Query`. Он также наследуется от общего класса `Param`.
    
    Но помните, что когда вы импортируете `Query`, `Path`, `Cookie` и другое из `fastapi`, это фактически функции, которые возвращают специальные классы.
    
    ///
    
    /// info | "Дополнительная информация"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.9K bytes
    - Viewed (0)
Back to top