- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 1,335 for Responses (0.14 sec)
-
docs/ja/docs/advanced/response-directly.md
これは例えば、カスタムヘッダーやcookieを返すときに便利です。 ## `Response` を返す 実際は、`Response` やそのサブクラスを返すことができます。 !!! tip "豆知識" `JSONResponse` それ自体は、 `Response` のサブクラスです。 `Response` を返した場合は、**FastAPI** は直接それを返します。 それは、Pydanticモデルのデータ変換や、コンテンツを任意の型に変換したりなどはしません。 これは多くの柔軟性を提供します。任意のデータ型を返したり、任意のデータ宣言やバリデーションをオーバーライドできます。 ## `jsonable_encoder` を `Response` の中で使う **FastAPI** はあなたが返す `Response` に対して何も変更を加えないので、コンテンツが準備できていることを保証しなければなりません。
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Nov 05 22:50:38 UTC 2020 - 3.6K bytes - Viewed (0) -
pilot/pkg/xds/adstest.go
} return } select { case a.responses <- resp: case <-a.context.Done(): return } } } // DrainResponses reads all responses, but does nothing to them func (a *AdsTest) DrainResponses() { for { select { case <-a.context.Done(): return case r := <-a.responses: log.Infof("drained response %v", r.TypeUrl) } } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Feb 04 03:39:42 UTC 2024 - 6K bytes - Viewed (0) -
docs_src/additional_responses/tutorial004.py
from typing import Union from fastapi import FastAPI from fastapi.responses import FileResponse from pydantic import BaseModel class Item(BaseModel): id: str value: str responses = { 404: {"description": "Item not found"}, 302: {"description": "The item was moved"}, 403: {"description": "Not enough privileges"}, } app = FastAPI() @app.get( "/items/{item_id}",
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 701 bytes - Viewed (0) -
pkg/test/framework/components/echo/common/call.go
err = fmt.Errorf("unexpected number of responses: expected %d, received %d", opts.Count, len(responses)) } // Convert to a CallResult. result := echo.CallResult{ From: from, Opts: opts, Responses: responses, } // Return the results from the validator. err = opts.Check(result, err) if err != nil { err = fmt.Errorf("call failed from %s to %s (using %s): %v",
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Oct 08 09:39:20 UTC 2023 - 6.7K bytes - Viewed (0) -
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: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Apr 02 02:32:57 UTC 2024 - 4.7K bytes - Viewed (0) -
pkg/test/echo/parse.go
) func ParseResponses(req *proto.ForwardEchoRequest, resp *proto.ForwardEchoResponse) Responses { responses := make([]Response, len(resp.Output)) for i, output := range resp.Output { responses[i] = parseResponse(output) responses[i].RequestURL = req.Url } return responses } func parseResponse(output string) Response { out := Response{ RawContent: output, RequestHeaders: make(http.Header),
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Feb 23 22:25:46 UTC 2022 - 4.3K bytes - Viewed (0) -
src/cmd/go/testdata/script/mod_proxy_errors.txt
[short] skip env GO111MODULE=on env GOSUMDB=off env GOPROXY=direct # Server responses should be truncated to some reasonable number of lines. # (For now, exactly eight.) ! go list -m vcs-test.golang.org/auth/ormanylines@latest stderr '\tserver response:\n(.|\n)*\tline 8\n\t\[Truncated: too many lines.\]$' # Server responses should be truncated to some reasonable number of characters. ! go list -m vcs-test.golang.org/auth/oronelongline@latest
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 24 15:54:04 UTC 2023 - 698 bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt
route: Route?, response: Response, ): Request? { if (route == null) throw NullPointerException("route == null") responses += response routes += route if (!schemeMatches(response) || credential == null) return null val header = when (response.code) { 407 -> "Proxy-Authorization" else -> "Authorization" } return response.request.newBuilder()
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py
) def test_query_params_str_validations(path, expected_status, expected_response): response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
mockwebserver/README.md
from your test's `tearDown()`. ### API #### MockResponse Mock responses default to an empty response body and a `200` status code. You can set a custom body with a string, input stream or byte array. Also add headers with a fluent builder API. ```java MockResponse response = new MockResponse() .addHeader("Content-Type", "application/json; charset=utf-8")
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 5K bytes - Viewed (0)