Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 357 for Response (0.06 sec)

  1. docs/em/docs/advanced/response-headers.md

    👆 💪 📣 `Response` 🔢 🔗, & ⚒ 🎚 (& 🍪) 👫.
    
    ## 📨 `Response` 🔗
    
    👆 💪 🚮 🎚 🕐❔ 👆 📨 `Response` 🔗.
    
    ✍ 📨 🔬 [📨 📨 🔗](response-directly.md){.internal-link target=_blank} & 🚶‍♀️ 🎚 🌖 🔢:
    
    ```Python hl_lines="10-12"
    {!../../docs_src/response_headers/tutorial001.py!}
    ```
    
    /// note | "📡 ℹ"
    
    👆 💪 ⚙️ `from starlette.responses import Response` ⚖️ `from starlette.responses import JSONResponse`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/response-headers.md

    你也可以在直接返回`Response`时添加头部。
    
    按照[直接返回响应](response-directly.md){.internal-link target=_blank}中所述创建响应,并将头部作为附加参数传递:
    ```Python hl_lines="10-12"
    {!../../docs_src/response_headers/tutorial001.py!}
    ```
    
    
    /// note | "技术细节"
    
    你也可以使用`from starlette.responses import Response`或`from starlette.responses import JSONResponse`。
    
    **FastAPI**提供了与`fastapi.responses`相同的`starlette.responses`,只是为了方便开发者。但是,大多数可用的响应都直接来自Starlette。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. docs/es/docs/advanced/response-headers.md

    Crea un response tal como se describe en [Retornar una respuesta directamente](response-directly.md){.internal-link target=_blank} y pasa los headers como un parámetro adicional:
    
    ```Python hl_lines="10-12"
    {!../../docs_src/response_headers/tutorial001.py!}
    ```
    
    /// note | Detalles Técnicos
    
    También podrías utilizar `from starlette.responses import Response` o `from starlette.responses import JSONResponse`.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/response-directly.md

    But you can return a `JSONResponse` directly from your *path operations*.
    
    It might be useful, for example, to return custom headers or cookies.
    
    ## Return a `Response`
    
    In fact, you can return any `Response` or any sub-class of it.
    
    /// tip
    
    `JSONResponse` itself is a sub-class of `Response`.
    
    ///
    
    And when you return a `Response`, **FastAPI** will pass it directly.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. docs/de/docs/advanced/response-headers.md

    Erstellen Sie eine Response wie in [Eine Response direkt zurückgeben](response-directly.md){.internal-link target=_blank} beschrieben und übergeben Sie die Header als zusätzlichen Parameter:
    
    ```Python hl_lines="10-12"
    {!../../docs_src/response_headers/tutorial001.py!}
    ```
    
    /// note | "Technische Details"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/response-headers.md

    ```Python hl_lines="10-12"
    {!../../docs_src/response_headers/tutorial001.py!}
    ```
    
    /// note | "Technical Details"
    
    You could also use `from starlette.responses import Response` or `from starlette.responses import JSONResponse`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/response-cookies.md

    ### 更多信息
    
    /// note | "技术细节"
    
    你也可以使用`from starlette.responses import Response` 或者 `from starlette.responses import JSONResponse`。
    
    为了方便开发者,**FastAPI** 封装了相同数据类型,如`starlette.responses` 和 `fastapi.responses`。不过大部分response对象都是直接引用自Starlette。
    
    因为`Response`对象可以非常便捷的设置headers和cookies,所以 **FastAPI** 同时也封装了`fastapi.Response`。
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  8. cmd/api-response.go

    	w.WriteHeader(statusCode)
    	if response != nil {
    		w.Write(response)
    	}
    }
    
    // mimeType represents various MIME type used API responses.
    type mimeType string
    
    const (
    	// Means no response type.
    	mimeNone mimeType = ""
    	// Means response type is JSON.
    	mimeJSON mimeType = "application/json"
    	// Means response type is XML.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 19:27:06 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  9. docs/em/docs/advanced/custom-response.md

    🔢, **FastAPI** 🔜 📨 📨 ⚙️ `JSONResponse`.
    
    👆 💪 🔐 ⚫️ 🛬 `Response` 🔗 👀 [📨 📨 🔗](response-directly.md){.internal-link target=_blank}.
    
    ✋️ 🚥 👆 📨 `Response` 🔗, 📊 🏆 🚫 🔁 🗜, & 🧾 🏆 🚫 🔁 🏗 (🖼, 🔌 🎯 "📻 🆎", 🇺🇸🔍 🎚 `Content-Type` 🍕 🏗 🗄).
    
    ✋️ 👆 💪 📣 `Response` 👈 👆 💚 ⚙️, *➡ 🛠️ 👨‍🎨*.
    
    🎚 👈 👆 📨 ⚪️➡️ 👆 *➡ 🛠️ 🔢* 🔜 🚮 🔘 👈 `Response`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  10. docs/zh/docs/advanced/response-directly.md

    直接返回响应可能会有用处,比如返回自定义的响应头和 cookies。
    
    ## 返回 `Response`
    
    事实上,你可以返回任意 `Response` 或者任意 `Response` 的子类。
    
    /// tip | "小贴士"
    
    `JSONResponse` 本身是一个 `Response` 的子类。
    
    ///
    
    当你返回一个 `Response` 时,**FastAPI** 会直接传递它。
    
    **FastAPI** 不会用 Pydantic 模型做任何数据转换,不会将响应内容转换成任何类型,等等。
    
    这种特性给你极大的可扩展性。你可以返回任何数据类型,重写任何数据声明或者校验,等等。
    
    ## 在 `Response` 中使用 `jsonable_encoder`
    
    由于 **FastAPI** 并未对你返回的 `Response` 做任何改变,你必须确保你已经准备好响应内容。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top