Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 391 - 400 of 1,924 for Responses (0.07 seconds)

  1. CHANGELOG/CHANGELOG-1.14.md

    * Fixes a regression proxying responses from aggregated API servers which could cause watch requests to hang until the first event was received ([#75887](https://github.com/kubernetes/kubernetes/pull/75887), [@liggitt](https://github.com/liggitt))
    Created: Fri Apr 03 09:05:14 GMT 2026
    - Last Modified: Mon Jun 14 22:06:39 GMT 2021
    - 271.5K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_body_updates/test_tutorial001.py

        return client
    
    
    def test_get(client: TestClient):
        response = client.get("/items/baz")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "Baz",
            "description": None,
            "price": 50.2,
            "tax": 10.5,
            "tags": [],
        }
    
    
    def test_put(client: TestClient):
        response = client.put(
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 7.3K bytes
    - Click Count (0)
  3. fastapi/.agents/skills/fastapi/references/streaming.md

    ```
    
    ## Stream bytes
    
    To stream bytes, declare a `response_class=` of `StreamingResponse` or a sub-class, and use `yield` to return the data.
    
    ```python
    from fastapi import FastAPI
    from fastapi.responses import StreamingResponse
    from app.utils import read_image
    
    app = FastAPI()
    
    
    class PNGStreamingResponse(StreamingResponse):
        media_type = "image/png"
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 10:05:57 GMT 2026
    - 2.5K bytes
    - Click Count (0)
  4. docs/pt/docs/tutorial/request-files.md

    Você receberá, tal como declarado, uma `list` de `bytes` ou `UploadFile`.
    
    /// note | Detalhes Técnicos
    
    Você também pode usar `from starlette.responses import HTMLResponse`.
    
    **FastAPI** providencia o mesmo `starlette.responses` que `fastapi.responses` apenas como uma conveniência para você, o desenvolvedor. Mas a maioria das respostas disponíveis vem diretamente do Starlette.
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 7.8K bytes
    - Click Count (0)
  5. docs/zh-hant/docs/tutorial/handling-errors.md

    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    /// note | 技術細節
    
    你也可以使用 `from starlette.requests import Request` 與 `from starlette.responses import JSONResponse`。
    
    **FastAPI** 以便利性為由,提供和 `starlette.responses` 相同的介面於 `fastapi.responses`。但大多數可用的回應類型其實直接來自 Starlette。`Request` 也一樣。
    
    ///
    
    ## 覆寫預設例外處理器 { #override-the-default-exception-handlers }
    
    **FastAPI** 內建了一些預設例外處理器。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 8.3K bytes
    - Click Count (0)
  6. docs_src/response_model/tutorial003_04_py310.py

    from fastapi import FastAPI, Response
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/portal")
    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
    - 352 bytes
    - Click Count (0)
  7. tests/test_include_route.py

    from fastapi.responses import JSONResponse
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    router = APIRouter()
    
    
    @router.route("/items/")
    def read_items(request: Request):
        return JSONResponse({"hello": "world"})
    
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    def test_sub_router():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 496 bytes
    - Click Count (0)
  8. docs_src/custom_response/tutorial006b_py310.py

    from fastapi import FastAPI
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/fastapi", response_class=RedirectResponse)
    async def redirect_fastapi():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 220 bytes
    - Click Count (0)
  9. docs/zh-hant/docs/tutorial/request-files.md

    {* ../../docs_src/request_files/tutorial002_an_py310.py hl[10,15] *}
    
    你會如宣告所示,收到由 `bytes` 或 `UploadFile` 組成的 `list`。
    
    /// note | 技術細節
    
    你也可以使用 `from starlette.responses import HTMLResponse`。
    
    **FastAPI** 為了讓你(開發者)更方便,提供與 `starlette.responses` 相同的內容作為 `fastapi.responses`。但大多數可用的回應類型其實直接來自 Starlette。
    
    ///
    
    ### 多檔案上傳且包含額外中繼資料 { #multiple-file-uploads-with-additional-metadata }
    
    同樣地,即使對 `UploadFile`,你也可以用 `File()` 設定額外參數:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 6.6K bytes
    - Click Count (0)
  10. docs_src/custom_response/tutorial003_py310.py

    from fastapi import FastAPI
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        html_content = """
        <html>
            <head>
                <title>Some HTML in here</title>
            </head>
            <body>
                <h1>Look ma! HTML!</h1>
            </body>
        </html>
        """
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 394 bytes
    - Click Count (0)
Back to Top