Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 149 for responseCh (0.21 sec)

  1. 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)
  2. docs/de/docs/advanced/custom-response.md

    !!! note "Technische Details"
        Sie können auch `from starlette.responses import HTMLResponse` 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.
    
    ### `Response`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 23 13:05:12 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  3. docs/ja/docs/advanced/custom-response.md

    `response_class` はOpenAPIの *path operation* ドキュメントにのみ使用されますが、 `Response` はそのまま使用されます。
    
    #### `HTMLResponse` を直接返す
    
    例えば、このようになります:
    
    ```Python hl_lines="7  21  23"
    {!../../../docs_src/custom_response/tutorial004.py!}
    ```
    
    この例では、関数 `generate_html_response()` は、`str` のHTMLを返すのではなく `Response` を生成して返しています。
    
    `generate_html_response()` を呼び出した結果を返すことにより、**FastAPI** の振る舞いを上書きする `Response` が既に返されています。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jul 19 19:14:58 GMT 2021
    - 10.7K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/response-model.md

    И ваши помощники разработки также будут счастливы, т.к. оба класса `RedirectResponse` и `JSONResponse` являются подклассами `Response`. Таким образом мы получаем корректную аннотацию типа.
    
    ### Подкласс Response в аннотации типа
    
    Вы также можете указать подкласс `Response` в аннотации типа:
    
    ```Python hl_lines="8-9"
    {!> ../../../docs_src/response_model/tutorial003_03.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 30.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/InterceptorTest.kt

                val response1 = chain.proceed(chain.request())
                response1.body.close()
                chain.proceed(chain.request())
              },
            )
            .build()
        val request =
          Request.Builder()
            .url(server.url("/"))
            .build()
        val response = client.newCall(request).execute()
        assertThat("b").isEqualTo(response.body.string())
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

        /** Don't accept an unvalidated cached response. */
        fun noCache() = commonNoCache()
    
        /** Don't store the server's response in any cache. */
        fun noStore() = commonNoStore()
    
        /**
         * Only accept the response if it is in the cache. If the response isn't cached, a `504
         * Unsatisfiable Request` response will be returned.
         */
        fun onlyIfCached() = commonOnlyIfCached()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/Response.kt

        }
    
        internal constructor(response: Response) {
          this.request = response.request
          this.protocol = response.protocol
          this.code = response.code
          this.message = response.message
          this.handshake = response.handshake
          this.headers = response.headers.newBuilder()
          this.body = response.body
          this.networkResponse = response.networkResponse
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/handling-errors.md

    ```
    
    !!! note "Technische Details"
        Sie können auch `from starlette.requests import Request` und `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. Das Gleiche gilt für `Request`.
    
    ## Die Default-Exceptionhandler überschreiben
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:28:29 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     *
     * Both this class and [Response] implement [Closeable]. Closing a response simply
     * closes its response body. If you invoke [Call.execute] or implement [Callback.onResponse] you
     * must close this body by calling any of the following methods:
     *
     * * `Response.close()`
     * * `Response.body().close()`
     * * `Response.body().source().close()`
     * * `Response.body().charStream().close()`
     * * `Response.body().byteStream().close()`
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

        cacheRequest: CacheRequest?,
        response: Response,
      ): Response {
        // Some apps return a null body; for compatibility we treat that like a null cache request.
        if (cacheRequest == null) return response
        val cacheBodyUnbuffered = cacheRequest.body()
    
        val source = response.body.source()
        val cacheBody = cacheBodyUnbuffered.buffer()
    
        val cacheWritingSource =
          object : Source {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
Back to top