Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 206 for COOKIE (0.53 sec)

  1. api/next/66008.txt

    pkg net/http, func ParseCookie(string) ([]*Cookie, error) #66008
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Wed Apr 17 17:43:50 GMT 2024
    - 131 bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/helper/RoleQueryHelper.java

            final Cookie[] cookies = request.getCookies();
            if (cookies != null) {
                for (final Cookie cookie : cookies) {
                    addRoleFromCookieMapping(roleSet, cookie);
                }
            }
    
        }
    
        protected void addRoleFromCookieMapping(final Set<String> roleNameList, final Cookie cookie) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  3. doc/next/6-stdlib/99-minor/net/http/66008.md

    The new [ParseCookie] function parses a Cookie header value and
    returns all the cookies which were set in it. Since the same cookie
    name can appear multiple times the returned Values can contain
    more than one value for a given key.
    
    The new [ParseSetCookie] function parses a Set-Cookie header value and
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Wed Apr 17 17:43:50 GMT 2024
    - 359 bytes
    - Viewed (0)
  4. tests/test_openapi_examples.py

        ),
    ):
        return data
    
    
    @app.get("/cookie_examples/")
    def cookie_examples(
        data: Union[str, None] = Cookie(
            default=None,
            examples=["json_schema_cookie1", "json_schema_cookie2"],
            openapi_examples={
                "Cookie One": {
                    "summary": "Cookie One Summary",
                    "description": "Cookie One Description",
                    "value": "cookie1",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 17K bytes
    - Viewed (0)
  5. docs_src/cookie_params/tutorial001.py

    from typing import Union
    
    from fastapi import Cookie, FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(ads_id: Union[str, None] = Cookie(default=None)):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 202 bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial005_an.py

    from typing import Union
    
    from fastapi import Cookie, Depends, FastAPI
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    def query_extractor(q: Union[str, None] = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[Union[str, None], Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 558 bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial005.py

    from typing import Union
    
    from fastapi import Cookie, Depends, FastAPI
    
    app = FastAPI()
    
    
    def query_extractor(q: Union[str, None] = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: str = Depends(query_extractor),
        last_query: Union[str, None] = Cookie(default=None),
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 486 bytes
    - Viewed (0)
  8. docs_src/dependencies/tutorial005_py310.py

    app = FastAPI()
    
    
    def query_extractor(q: str | None = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: str = Depends(query_extractor), last_query: str | None = Cookie(default=None)
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 443 bytes
    - Viewed (0)
  9. docs_src/websockets/tutorial002_py310.py

    async def websocket_endpoint(
        websocket: WebSocket,
        item_id: str,
        q: int | None = None,
        cookie_or_token: str = Depends(get_cookie_or_token),
    ):
        await websocket.accept()
        while True:
            data = await websocket.receive_text()
            await websocket.send_text(
                f"Session cookie or query token value is: {cookie_or_token}"
            )
            if q is not None:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/dependencies/sub-dependencies.md

    * 同时,该函数还声明了类型是 `str` 的可选 cookie(`last_query`)
        * 用户未提供查询参数 `q` 时,则使用上次使用后保存在 cookie 中的查询
    
    ### 使用依赖项
    
    接下来,就可以使用依赖项:
    
    ```Python hl_lines="22"
    {!../../../docs_src/dependencies/tutorial005.py!}
    ```
    
    !!! info "信息"
    
        注意,这里在*路径操作函数*中只声明了一个依赖项,即 `query_or_cookie_extractor` 。
    
        但 **FastAPI** 必须先处理 `query_extractor`,以便在调用 `query_or_cookie_extractor` 时使用 `query_extractor` 返回的结果。
    
    ```mermaid
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 3.2K bytes
    - Viewed (0)
Back to top