- Sort Score
- Num 10 results
- Language All
Results 411 - 420 of 1,924 for Responses (0.26 seconds)
-
CHANGELOG/CHANGELOG-1.33.md
- Improved how the API server responds to **list** requests where the response format negotiates to Protobuf. List responses in Protobuf are marshalled one element at the time, drastically reducing memory needed to serve large collections. Streaming list responses can be disabled via the `StreamingCollectionEncodingToProtobuf` feature gate. ([#129407](https://github.com/kubernetes/kubernetes/pull/129407), [@serath...
Created: Fri Apr 03 09:05:14 GMT 2026 - Last Modified: Thu Mar 19 03:17:58 GMT 2026 - 369K bytes - Click Count (0) -
docs_src/handling_errors/tutorial003_py310.py
from fastapi import FastAPI, Request from fastapi.responses import JSONResponse class UnicornException(Exception): def __init__(self, name: str): self.name = name app = FastAPI() @app.exception_handler(UnicornException) async def unicorn_exception_handler(request: Request, exc: UnicornException): return JSONResponse( status_code=418,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 626 bytes - Click Count (0) -
docs/uk/docs/tutorial/request-files.md
Ви отримаєте, як і було оголошено, `list` із `bytes` або `UploadFile`. /// note | Технічні деталі Ви також можете використати `from starlette.responses import HTMLResponse`. **FastAPI** надає ті ж самі `starlette.responses`, що й `fastapi.responses`, просто для зручності для вас, розробника. Але більшість доступних відповідей надходять безпосередньо від Starlette. ///
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 11K bytes - Click Count (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial009.py
data = {"2": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data) assert response.status_code == 200, response.text assert response.json() == data def test_post_invalid_body(client: TestClient): data = {"foo": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data) assert response.status_code == 422, response.text assert response.json() == { "detail": [Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 4.5K bytes - Click Count (0) -
docs_src/response_model/tutorial003_05_py310.py
from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal", response_model=None) async def get_portal(teleport: bool = False) -> Response | dict: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Jan 10 16:22:47 GMT 2023 - 373 bytes - Click Count (0) -
docs_src/custom_response/tutorial001b_py310.py
from fastapi import FastAPI from fastapi.responses import ORJSONResponse app = FastAPI() @app.get("/items/", response_class=ORJSONResponse) async def read_items():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 215 bytes - Click Count (0) -
docs/es/docs/tutorial/request-files.md
/// note | Detalles Técnicos También podrías usar `from starlette.responses import HTMLResponse`. **FastAPI** proporciona las mismas `starlette.responses` como `fastapi.responses` solo como una conveniencia para ti, el desarrollador. Pero la mayoría de los responses disponibles vienen directamente de Starlette. ///
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 7.6K bytes - Click Count (0) -
docs_src/response_cookies/tutorial001_py310.py
from fastapi import FastAPI from fastapi.responses import JSONResponse app = FastAPI() @app.post("/cookie/") def create_cookie(): content = {"message": "Come to the dark side, we have cookies"} response = JSONResponse(content=content) response.set_cookie(key="fakesession", value="fake-cookie-session-value")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 344 bytes - Click Count (0) -
tests/test_tutorial/test_authentication_error_status_code/test_tutorial001.py
def test_get_me(client: TestClient): response = client.get("/me", headers={"Authorization": "Bearer secrettoken"}) assert response.status_code == 200 assert response.json() == { "message": "You are authenticated", "token": "secrettoken", } def test_get_me_no_credentials(client: TestClient): response = client.get("/me") assert response.status_code == 403
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1.9K bytes - Click Count (0) -
docs_src/custom_response/tutorial006c_py310.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/pydantic", response_class=RedirectResponse, status_code=302) async def redirect_pydantic():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 237 bytes - Click Count (0)