Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. docs/changelogs/changelog_3x.md

        implementation. This is useful in sandboxed environments like Google App
        Engine.
    
     *  **OkHttp now does cookies.** We've replaced `java.net.CookieHandler` with
        a new interface, `CookieJar` and added our own `Cookie` model class. This
        new cookie follows the latest RFC and supports the same cookie attributes
        as modern web browsers.
    
     *  **Form and Multipart bodies are now modeled.** We've replaced the opaque
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Feb 06 14:55:54 UTC 2022
    - 50.8K bytes
    - Viewed (0)
  4. docs/es/docs/features.md

    * API keys en:
        * Headers.
        * Parámetros de Query.
        * Cookies, etc.
    
    Más todas las características de seguridad de Starlette (incluyendo **session cookies**).
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. 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)
  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/zh/docs/advanced/response-change-status-code.md

    ## 使用 `Response` 参数
    
    你可以在你的*路径操作函数*中声明一个`Response`类型的参数(就像你可以为cookies和头部做的那样)。
    
    然后你可以在这个*临时*响应对象中设置`status_code`。
    
    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    然后你可以像平常一样返回任何你需要的对象(例如一个`dict`或者一个数据库模型)。如果你声明了一个`response_model`,它仍然会被用来过滤和转换你返回的对象。
    
    **FastAPI**将使用这个临时响应来提取状态码(也包括cookies和头部),并将它们放入包含你返回的值的最终响应中,该响应由任何`response_model`过滤。
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Jun 10 20:30:28 UTC 2023
    - 1.4K bytes
    - Viewed (0)
Back to top