- Sort Score
- Num 10 results
- Language All
Results 81 - 90 of 104 for mediaType (0.26 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
build-logic/documentation/src/main/groovy/gradlebuild/docs/XIncludeAwareXmlProvider.groovy
transformer.setOutputProperty(OutputKeys.INDENT, "yes") } transformer.setOutputProperty(OutputKeys.METHOD, "xml") transformer.setOutputProperty(OutputKeys.MEDIA_TYPE, "text/xml") transformer.transform(new DOMSource(root), new StreamResult(stream)) } } Document getDocument() { root }
Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Wed Dec 09 08:14:05 GMT 2020 - 2.2K bytes - Click Count (0) -
docs/ko/docs/advanced/custom-response.md
다음 매개변수를 받을 수 있습니다: * `content` - `str` 또는 `bytes`. * `status_code` - HTTP 상태 코드를 나타내는 `int`. * `headers` - 문자열로 이루어진 `dict`. * `media_type` - 미디어 타입을 나타내는 `str` 예: `"text/html"`. FastAPI(정확히는 Starlette)가 자동으로 Content-Length 헤더를 포함시킵니다. 또한 `media_type`에 기반하여 Content-Type 헤더를 포함하며, 텍스트 타입의 경우 문자 집합을 추가합니다. {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *} ### `HTMLResponse` { #htmlresponse }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 12.4K bytes - Click Count (0) -
docs/zh/docs/advanced/custom-response.md
你可以直接返回它。 `Response` 类接受如下参数: * `content` - 一个 `str` 或者 `bytes`。 * `status_code` - 一个 `int` 类型的 HTTP 状态码。 * `headers` - 一个由字符串组成的 `dict`。 * `media_type` - 一个给出媒体类型的 `str`,比如 `"text/html"`。 FastAPI(实际上是 Starlette)将自动包含 Content-Length 的头。它还将包含一个基于 `media_type` 的 Content-Type 头,并为文本类型附加一个字符集。 {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *} ### `HTMLResponse` { #htmlresponse }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.4K bytes - Click Count (0) -
docs/ru/docs/advanced/custom-response.md
- `content` — `str` или `bytes`. - `status_code` — целое число, HTTP статус-код. - `headers` — словарь строк. - `media_type` — строка, задающая тип содержимого. Например, `"text/html"`. FastAPI (фактически Starlette) автоматически добавит заголовок Content-Length. Также будет добавлен заголовок Content-Type, основанный на `media_type` и с добавлением charset для текстовых типов. {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 17.6K bytes - Click Count (0) -
docs/uk/docs/advanced/custom-response.md
- `content` - `str` або `bytes`. - `status_code` - `int` - код статусу HTTP. - `headers` - `dict` строк. - `media_type` - `str`, що задає медіа-тип, напр. `"text/html"`. FastAPI (насправді Starlette) автоматично додасть заголовок Content-Length. Також буде додано заголовок Content-Type на основі `media_type` з додаванням набору символів для текстових типів. {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 17K bytes - Click Count (0) -
tests/test_additional_responses_response_class.py
from fastapi.responses import JSONResponse from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel app = FastAPI() class JsonApiResponse(JSONResponse): media_type = "application/vnd.api+json" class Error(BaseModel): status: str title: str class JsonApiError(BaseModel): errors: list[Error] @app.get( "/a",
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 3.8K bytes - Click Count (0) -
docs/pt/docs/advanced/custom-response.md
* `status_code` - Um código de status HTTP do tipo `int`. * `headers` - Um `dict` de strings. * `media_type` - Uma `str` informando o media type. E.g. `"text/html"`. O FastAPI (Starlette, na verdade) irá incluir o cabeçalho Content-Length automaticamente. Ele também irá incluir o cabeçalho Content-Type, baseado no `media_type` e acrescentando uma codificação para tipos textuais.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 12K bytes - Click Count (0) -
docs/ja/docs/advanced/custom-response.md
直接返すことができます。 以下のパラメータを受け付けます。 * `content` - `str` または `bytes` * `status_code` - `int` のHTTPステータスコード * `headers` - 文字列の `dict` * `media_type` - メディアタイプを示す `str`。例: `"text/html"` FastAPI(実際にはStarlette)は自動的に Content-Length ヘッダーを含めます。また、`media_type` に基づいた Content-Type ヘッダーを含め、テキストタイプには charset を追加します。 {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *} ### `HTMLResponse` { #htmlresponse }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 13.5K bytes - Click Count (0) -
tests/test_default_response_class_router.py
from fastapi import APIRouter, FastAPI from fastapi.responses import HTMLResponse, JSONResponse, PlainTextResponse from fastapi.testclient import TestClient class OverrideResponse(JSONResponse): media_type = "application/x-override" app = FastAPI() router_a = APIRouter() router_a_a = APIRouter() router_a_b_override = APIRouter() # Overrides default class router_b_override = APIRouter() # Overrides default class
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 20:49:20 GMT 2020 - 5K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/custom-response.md
你也可以直接回傳它。 它接受以下參數: - `content` - `str` 或 `bytes`。 - `status_code` - `int` 類型的 HTTP 狀態碼。 - `headers` - 由字串組成的 `dict`。 - `media_type` - 描述 media type 的 `str`。例如 `"text/html"`。 FastAPI(實際上是 Starlette)會自動包含 Content-Length 標頭。也會根據 `media_type`(並為文字型別附加 charset)包含 Content-Type 標頭。 {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *} ### `HTMLResponse` { #htmlresponse }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.3K bytes - Click Count (0)