- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for 307 (0.01 sec)
-
tests/test_tutorial/test_custom_response/test_tutorial006b.py
from docs_src.custom_response.tutorial006b_py39 import app client = TestClient(app) def test_redirect_response_class(): response = client.get("/fastapi", follow_redirects=False) assert response.status_code == 307 assert response.headers["location"] == "https://fastapi.tiangolo.com" def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 904 bytes - Viewed (0) -
tests/test_tutorial/test_advanced_middleware/test_tutorial001.py
response = client.get("/") assert response.status_code == 200, response.text client = TestClient(app) response = client.get("/", follow_redirects=False) assert response.status_code == 307, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 479 bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_03.py
from docs_src.response_model.tutorial003_03_py39 import app client = TestClient(app) def test_get_portal(): response = client.get("/teleport", follow_redirects=False) assert response.status_code == 307, response.text assert response.headers["location"] == "https://www.youtube.com/watch?v=dQw4w9WgXcQ" def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial001_01.py
client = TestClient( app, base_url="https://example.com", follow_redirects=False, ) def test_redirect() -> None: response = client.get("/items") assert response.status_code == 307 assert response.headers["location"] == "https://example.com/items/" def test_no_redirect() -> None: response = client.get("/items/") assert response.status_code == 200
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 544 bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_02.py
def test_get_redirect(): response = client.get("/portal", params={"teleport": True}, follow_redirects=False) assert response.status_code == 307, response.text assert response.headers["location"] == "https://www.youtube.com/watch?v=dQw4w9WgXcQ" def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.4K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial006.py
from docs_src.custom_response.tutorial006_py39 import app client = TestClient(app) def test_get(): response = client.get("/typer", follow_redirects=False) assert response.status_code == 307, response.text assert response.headers["location"] == "https://typer.tiangolo.com" def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_05.py
def test_get_redirect(client: TestClient): response = client.get("/portal", params={"teleport": True}, follow_redirects=False) assert response.status_code == 307, response.text assert response.headers["location"] == "https://www.youtube.com/watch?v=dQw4w9WgXcQ" def test_openapi_schema(client: TestClient): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.8K bytes - Viewed (0) -
docs/ko/docs/advanced/custom-response.md
/// {* ../../docs_src/custom_response/tutorial001.py hl[2,7] *} /// tip | 팁 `ORJSONResponse`가 더 빠른 대안일 가능성이 있습니다. /// ### `RedirectResponse` HTTP 리디렉션 응답을 반환합니다. 기본적으로 상태 코드는 307(임시 리디렉션)으로 설정됩니다. `RedirectResponse`를 직접 반환할 수 있습니다. {* ../../docs_src/custom_response/tutorial006.py hl[2,9] *} --- 또는 `response_class` 매개변수에서 사용할 수도 있습니다:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Feb 15 11:21:20 UTC 2025 - 13.4K bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
/// tip It's possible that `ORJSONResponse` might be a faster alternative. /// ### `RedirectResponse` { #redirectresponse } Returns an HTTP redirect. Uses a 307 status code (Temporary Redirect) by default. You can return a `RedirectResponse` directly: {* ../../docs_src/custom_response/tutorial006_py39.py hl[2,9] *} ---Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 12.4K bytes - Viewed (0) -
docs/de/docs/advanced/custom-response.md
Möglicherweise ist `ORJSONResponse` eine schnellere Alternative. /// ### `RedirectResponse` { #redirectresponse } Gibt eine HTTP-Weiterleitung (HTTP-Redirect) zurück. Verwendet standardmäßig den Statuscode 307 – Temporäre Weiterleitung (Temporary Redirect). Sie können eine `RedirectResponse` direkt zurückgeben: {* ../../docs_src/custom_response/tutorial006_py39.py hl[2,9] *} ---Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 14.4K bytes - Viewed (0)