Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 1,413 for responseCh (0.08 sec)

  1. internal/http/response-recorder.go

    	"time"
    
    	"github.com/klauspost/compress/gzip"
    )
    
    // ResponseRecorder - is a wrapper to trap the http response
    // status code and to record the response body
    type ResponseRecorder struct {
    	http.ResponseWriter
    	io.ReaderFrom
    	StatusCode int
    	// Log body of 4xx or 5xx responses
    	LogErrBody bool
    	// Log body of all responses
    	LogAllBody bool
    
    	ttfbHeader time.Duration
    	ttfbBody   time.Duration
    
    	StartTime time.Time
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 17:13:00 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/custom-response.md

    # 自定义响应 - HTML,流,文件和其他
    
    **FastAPI** 默认会使用 `JSONResponse` 返回响应。
    
    你可以通过直接返回 `Response` 来重载它,参见 [直接返回响应](response-directly.md){.internal-link target=_blank}。
    
    但如果你直接返回 `Response`,返回数据不会自动转换,也不会自动生成文档(例如,在 HTTP 头 `Content-Type` 中包含特定的「媒体类型」作为生成的 OpenAPI 的一部分)。
    
    你还可以在 *路径操作装饰器* 中声明你想用的 `Response`。
    
    你从 *路径操作函数* 中返回的内容将被放在该 `Response` 中。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/response-status-code.md

        * Ein spezieller Fall ist `204`, „No Content“ („Kein Inhalt“). Diese Response wird verwendet, wenn es keinen Inhalt gibt, der zum Client zurückgeschickt wird, diese Response hat also keinen Body.
    * **`300`** und darüber steht für „Redirection“ („Umleitung“).  Responses mit diesen Statuscodes können einen oder keinen Body haben, mit Ausnahme von `304`, „Not Modified“ („Nicht verändert“), welche keinen haben darf.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:59:43 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. 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()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 10K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java

        }
    
        String response2Body;
        try (Response response2 = client.newCall(request).execute()) {
          if (!response2.isSuccessful()) throw new IOException("Unexpected code " + response2);
    
          response2Body = response2.body().string();
          System.out.println("Response 2 response:          " + response2);
          System.out.println("Response 2 cache response:    " + response2.cacheResponse());
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 2.4K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/response-model.md

    因此,**FastAPI** 将会负责过滤掉未在输出模型中声明的所有数据(使用 Pydantic)。
    
    ## 在文档中查看
    
    当你查看自动化文档时,你可以检查输入模型和输出模型是否都具有自己的 JSON Schema:
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image01.png">
    
    并且两种模型都将在交互式 API 文档中使用:
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image02.png">
    
    ## 响应模型编码参数
    
    你的响应模型可以具有默认值,例如:
    
    ```Python hl_lines="11  13-14"
    {!../../docs_src/response_model/tutorial004.py!}
    ```
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/response-status-code.md

    ///
    
    Dessa forma:
    
    * Este código de status será retornado na resposta.
    * Será documentado como tal no esquema OpenAPI (e, portanto, nas interfaces do usuário):
    
    <img src="/img/tutorial/response-status-code/image01.png">
    
    /// note | "Nota"
    
    Alguns códigos de resposta (consulte a próxima seção) indicam que a resposta não possui um corpo.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/response-model.md

    ## ドキュメントを見る
    
    自動ドキュメントを見ると、入力モデルと出力モデルがそれぞれ独自のJSON Schemaを持っていることが確認できます。
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image01.png">
    
    そして、両方のモデルは、対話型のAPIドキュメントに使用されます:
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image02.png">
    
    ## レスポンスモデルのエンコーディングパラメータ
    
    レスポンスモデルにはデフォルト値を設定することができます:
    
    ```Python hl_lines="11 13 14"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  9. docs/ko/docs/tutorial/response-model.md

    따라서 **FastAPI**는 출력 모델에서 선언하지 않은 모든 데이터를 (Pydantic을 사용하여) 필터링합니다.
    
    ## 문서에서 보기
    
    자동 생성 문서를 보면 입력 모델과 출력 모델이 각자의 JSON 스키마를 가지고 있음을 확인할 수 있습니다:
    
    <img src="/img/tutorial/response-model/image01.png">
    
    그리고 두 모델 모두 대화형 API 문서에 사용됩니다:
    
    <img src="/img/tutorial/response-model/image02.png">
    
    ## 응답 모델 인코딩 매개변수
    
    응답 모델은 아래와 같이 기본값을 가질 수 있습니다:
    
    ```Python hl_lines="11  13-14"
    {!../../docs_src/response_model/tutorial004.py!}
    ```
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  10. 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: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.5K bytes
    - Viewed (0)
Back to top