Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 332 for Cookie2 (0.17 sec)

  1. docs/zh/docs/tutorial/header-params.md

        ```
    
    !!! note "技术细节"
    
        `Header` 是 `Path`、`Query`、`Cookie` 的**兄弟类**,都继承自共用的 `Param` 类。
    
        注意,从 `fastapi` 导入的 `Query`、`Path`、`Header` 等对象,实际上是返回特殊类的函数。
    
    !!! info "说明"
    
        必须使用 `Header` 声明 header 参数,否则该参数会被解释为查询参数。
    
    ## 自动转换
    
    `Header` 比 `Path`、`Query` 和 `Cookie` 提供了更多功能。
    
    大部分标准请求头用**连字符**分隔,即**减号**(`-`)。
    
    但是 `user-agent` 这样的变量在 Python 中是无效的。
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 22:42:51 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  2. docs_src/websockets/tutorial002_an.py

    from typing import Union
    
    from fastapi import (
        Cookie,
        Depends,
        FastAPI,
        Query,
        WebSocket,
        WebSocketException,
        status,
    )
    from fastapi.responses import HTMLResponse
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    html = """
    <!DOCTYPE html>
    <html>
        <head>
            <title>Chat</title>
        </head>
        <body>
            <h1>WebSocket Chat</h1>
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  3. docs_src/websockets/tutorial002_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import (
        Cookie,
        Depends,
        FastAPI,
        Query,
        WebSocket,
        WebSocketException,
        status,
    )
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    html = """
    <!DOCTYPE html>
    <html>
        <head>
            <title>Chat</title>
        </head>
        <body>
            <h1>WebSocket Chat</h1>
            <form action="" onsubmit="sendMessage(event)">
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/response-change-status-code.md

    For those cases, you can use a `Response` parameter.
    
    ## Use a `Response` parameter
    
    You can declare a parameter of type `Response` in your *path operation function* (as you can do for cookies and headers).
    
    And then you can set the `status_code` in that *temporal* response object.
    
    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Jan 11 16:31:18 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  5. pilot/pkg/security/authz/builder/testdata/http/custom-http-provider-out2.yaml

        authorizationResponse:
          allowedClientHeaders:
            patterns:
            - exact: Set-cookie
              ignoreCase: true
            - ignoreCase: true
              prefix: x-prefix-
            - ignoreCase: true
              suffix: -suffix
          allowedClientHeadersOnSuccess:
            patterns:
            - exact: Set-cookie
              ignoreCase: true
            - ignoreCase: true
              prefix: x-prefix-
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 20 12:45:43 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial005_an_py39.py

    from typing import Annotated, 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: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[Union[str, None], Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 529 bytes
    - Viewed (0)
  7. src/net/internal/socktest/switch_unix.go

    	}
    	return &so
    }
    
    // addLocked returns a new Status without locking.
    // sw.smu must be held before call.
    func (sw *Switch) addLocked(s, family, sotype, proto int) *Status {
    	sw.once.Do(sw.init)
    	so := Status{Cookie: cookie(family, sotype, proto)}
    	sw.sotab[s] = so
    	return &so
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:54:10 UTC 2023
    - 718 bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/header-params.md

    # Header Parameters
    
    You can define Header parameters the same way you define `Query`, `Path` and `Cookie` parameters.
    
    ## Import `Header`
    
    First import `Header`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="3"
        {!> ../../../docs_src/header_params/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="3"
        {!> ../../../docs_src/header_params/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  9. docs/vi/docs/features.md

    * API keys in:
        * Headers.
        * Các tham số trong query string.
        * Cookies, etc.
    
    Cộng với tất cả các tính năng bảo mật từ Starlette (bao gồm **session cookies**).
    
    Tất cả được xây dựng dưới dạng các công cụ và thành phần có thể tái sử dụng, dễ dàng tích hợp với hệ thống, kho lưu trữ dữ liệu, cơ sở dữ liệu quan hệ và NoSQL của bạn,...
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  10. docs/en/mkdocs.yml

        - advanced/additional-status-codes.md
        - advanced/response-directly.md
        - advanced/custom-response.md
        - advanced/additional-responses.md
        - advanced/response-cookies.md
        - advanced/response-headers.md
        - advanced/response-change-status-code.md
        - advanced/advanced-dependencies.md
        - Advanced Security:
          - advanced/security/index.md
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu May 02 22:37:31 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top