- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for generate_html_response (0.2 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/custom_response/tutorial004_py39.py
from fastapi import FastAPI from fastapi.responses import HTMLResponse app = FastAPI() def generate_html_response(): html_content = """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ return HTMLResponse(content=html_content, status_code=200)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 491 bytes - Click Count (0) -
docs/es/docs/advanced/custom-response.md
Por ejemplo, podría ser algo así: {* ../../docs_src/custom_response/tutorial004_py39.py hl[7,21,23] *} En este ejemplo, la función `generate_html_response()` ya genera y devuelve una `Response` en lugar de devolver el HTML en un `str`. Al devolver el resultado de llamar a `generate_html_response()`, ya estás devolviendo una `Response` que sobrescribirá el comportamiento por defecto de **FastAPI**.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 13.2K bytes - Click Count (0) -
docs/ja/docs/advanced/custom-response.md
#### `HTMLResponse` を直接返す 例えば、このようになります: {* ../../docs_src/custom_response/tutorial004.py hl[7,21,23] *} この例では、関数 `generate_html_response()` は、`str` のHTMLを返すのではなく `Response` を生成して返しています。 `generate_html_response()` を呼び出した結果を返すことにより、**FastAPI** の振る舞いを上書きする `Response` が既に返されています。Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 10.4K bytes - Click Count (0) -
docs/ko/docs/advanced/custom-response.md
### `HTMLResponse`직접 반환하기 예를 들어, 다음과 같이 작성할 수 있습니다: {* ../../docs_src/custom_response/tutorial004.py hl[7,21,23] *} 이 예제에서, `generate_html_response()` 함수는 HTML을 `str`로 반환하는 대신 이미 `Response`를 생성하고 반환합니다. `generate_html_response()`를 호출한 결과를 반환함으로써, 기본적인 **FastAPI** 기본 동작을 재정의 하는 `Response`를 이미 반환하고 있습니다.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Feb 15 11:21:20 GMT 2025 - 13.4K bytes - Click Count (0) -
docs/ru/docs/advanced/custom-response.md
Например, это может быть что-то вроде: {* ../../docs_src/custom_response/tutorial004_py39.py hl[7,21,23] *} В этом примере функция `generate_html_response()` уже генерирует и возвращает `Response` вместо возврата HTML в `str`. Возвращая результат вызова `generate_html_response()`, вы уже возвращаете `Response`, который переопределит поведение **FastAPI** по умолчанию.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 19.7K bytes - Click Count (0) -
docs/pt/docs/advanced/custom-response.md
Por exemplo, poderia ser algo como: {* ../../docs_src/custom_response/tutorial004_py39.py hl[7,21,23] *} Neste exemplo, a função `generate_html_response()` já cria e retorna uma `Response` em vez de retornar o HTML em uma `str`. Ao retornar o resultado chamando `generate_html_response()`, você já está retornando uma `Response` que irá sobrescrever o comportamento padrão do **FastAPI**.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 13.8K bytes - Click Count (0)