Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 515 for responseCh (0.32 sec)

  1. docs/en/docs/reference/responses.md

    # Custom Response Classes - File, HTML, Redirect, Streaming, etc.
    
    There are several custom response classes you can use to create an instance and return them directly from your *path operations*.
    
    Read more about it in the [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).
    
    You can import them directly from `fastapi.responses`:
    
    ```python
    from fastapi.responses import (
        FileResponse,
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

              call: Call,
              response: Response,
            ) {
              responses.offer(response.body.string())
            }
          }
    
        // Make the first request waiting until we get our auth challenge.
        val request = Request(server.url("/"))
        blockingAuthClient.newCall(request).enqueue(callback)
        val response1 = responses.take()
        assertThat(response1).isEqualTo("")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/custom-response.md

        **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette.
    
    ### `Response`
    
    The main `Response` class, all the other responses inherit from it.
    
    You can return it directly.
    
    It accepts the following parameters:
    
    * `content` - A `str` or `bytes`.
    * `status_code` - An `int` HTTP status code.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  4. 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`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  5. docs/zh/docs/advanced/response-cookies.md

    ## 直接响应 `Response`
    
    你还可以在直接响应`Response`时直接创建cookies。
    
    你可以参考[Return a Response Directly](response-directly.md){.internal-link target=_blank}来创建response
    
    然后设置Cookies,并返回:
    
    ```Python hl_lines="10-12"
    {!../../../docs_src/response_cookies/tutorial001.py!}
    ```
    
    !!! tip
        需要注意,如果你直接反馈一个response对象,而不是使用`Response`入参,FastAPI则会直接反馈你封装的response对象。
    
        所以你需要确保你响应数据类型的正确性,如:你可以使用`JSONResponse`来兼容JSON的场景。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Aug 18 16:09:38 GMT 2022
    - 2.1K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/response-directly.md

    ```Python hl_lines="6-7  21-22"
    {!../../../docs_src/response_directly/tutorial001.py!}
    ```
    
    !!! note "Technical Details"
        You could also use `from starlette.responses import JSONResponse`.
    
        **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 3K bytes
    - Viewed (0)
  7. docs/em/docs/advanced/response-directly.md

    ```Python hl_lines="6-7  21-22"
    {!../../../docs_src/response_directly/tutorial001.py!}
    ```
    
    !!! note "📡 ℹ"
        👆 💪 ⚙️ `from starlette.responses import JSONResponse`.
    
        **FastAPI** 🚚 🎏 `starlette.responses` `fastapi.responses` 🏪 👆, 👩‍💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃.
    
    ## 🛬 🛃 `Response`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  8. docs/em/docs/advanced/custom-response.md

    <img src="/img/tutorial/custom-response/image01.png">
    
    ## 💪 📨
    
    📥 💪 📨.
    
    ✔️ 🤯 👈 👆 💪 ⚙️ `Response` 📨 🕳 🙆, ⚖️ ✍ 🛃 🎧-🎓.
    
    !!! note "📡 ℹ"
        👆 💪 ⚙️ `from starlette.responses import HTMLResponse`.
    
        **FastAPI** 🚚 🎏 `starlette.responses` `fastapi.responses` 🏪 👆, 👩‍💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃.
    
    ### `Response`
    
    👑 `Response` 🎓, 🌐 🎏 📨 😖 ⚪️➡️ ⚫️.
    
    👆 💪 📨 ⚫️ 🔗.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

        val request = Request(server.url("/"))
    
        val call = client.newCall(request)
        val response1 = call.execute()
    
        val cloned = call.clone()
        val response2 = cloned.execute()
    
        assertThat("abc").isEqualTo(response1.body.string())
        assertThat("def").isEqualTo(response2.body.string())
      }
    
      @Test
      @Flaky
      fun testMockWebserverRequest() {
        enableTls()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/response-headers.md

        Sie können auch `from starlette.responses import Response` oder `from starlette.responses import JSONResponse` verwenden.
    
        **FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:19:06 GMT 2024
    - 2.6K bytes
    - Viewed (0)
Back to top