Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 41 - 50 of 1,924 for Responses (0.13 seconds)

  1. tests/test_tuples.py

        response = client.post("/tuple-of-models/", json=data)
        assert response.status_code == 422, response.text
    
        data = [{"x": 1, "y": 2}]
        response = client.post("/tuple-of-models/", json=data)
        assert response.status_code == 422, response.text
    
    
    def test_tuple_form_valid():
        response = client.post("/tuple-form/", data={"values": ("1", "2")})
        assert response.status_code == 200, response.text
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 10.8K bytes
    - Click Count (0)
  2. docs/en/docs/advanced/response-cookies.md

    /// note | Technical Details
    
    You could also use `from starlette.responses import Response` or `from starlette.responses import JSONResponse`.
    
    **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 2.2K bytes
    - Click Count (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt

          }
        }
    
        constructor(response: Response) {
          this.url = response.request.url
          this.varyHeaders = response.varyHeaders()
          this.requestMethod = response.request.method
          this.protocol = response.protocol
          this.code = response.code
          this.message = response.message
          this.responseHeaders = response.headers
          this.handshake = response.handshake
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Mar 20 09:13:37 GMT 2026
    - 26.9K bytes
    - Click Count (0)
  4. docs_src/bigger_applications/app_an_py310/routers/items.py

    from fastapi import APIRouter, Depends, HTTPException
    
    from ..dependencies import get_token_header
    
    router = APIRouter(
        prefix="/items",
        tags=["items"],
        dependencies=[Depends(get_token_header)],
        responses={404: {"description": "Not found"}},
    )
    
    
    fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}}
    
    
    @router.get("/")
    async def read_items():
        return fake_items_db
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1011 bytes
    - Click Count (0)
  5. tests/test_openapi_separate_input_output_schemas.py

        client_no = get_app_client(separate_input_output_schemas=False)
        response = client.post("/items/", json={"name": "Plumbus"})
        response2 = client_no.post("/items/", json={"name": "Plumbus"})
        assert response.status_code == response2.status_code == 200, response.text
        assert (
            response.json()
            == response2.json()
            == {"name": "Plumbus", "description": None, "sub": None}
        )
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 27.8K bytes
    - Click Count (0)
  6. docs/ko/docs/advanced/path-operation-advanced-configuration.md

    {* ../../docs_src/path_operation_advanced_configuration/tutorial004_py310.py hl[17:27] *}
    
    ## 추가 응답 { #additional-responses }
    
    *경로 처리*에 대해 `response_model`과 `status_code`를 선언하는 방법을 이미 보셨을 것입니다.
    
    이는 *경로 처리*의 기본 응답에 대한 메타데이터를 정의합니다.
    
    모델, 상태 코드 등과 함께 추가 응답도 선언할 수 있습니다.
    
    이에 대한 문서의 전체 장이 있으니, [OpenAPI의 추가 응답](additional-responses.md)에서 읽어보세요.
    
    ## OpenAPI Extra { #openapi-extra }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 7.6K bytes
    - Click Count (0)
  7. tests/test_infer_param_optionality.py

        response = client.get("/users")
        assert response.status_code == 200, response.text
        assert response.json() == [{"user_id": "u1"}, {"user_id": "u2"}]
    
    
    def test_get_user():
        """Check that /users/{user_id} returns expected data"""
        response = client.get("/users/abc123")
        assert response.status_code == 200, response.text
        assert response.json() == {"user_id": "abc123"}
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 13.2K bytes
    - Click Count (0)
  8. docs/changelogs/changelog_1x.md

     * Fix: Route selection shouldn't use TLS modes that we know will fail.
     * Fix: Cache SPDY responses even if the response body is closed prematurely.
     * Fix: Use strict timeouts when aborting a download.
     * Fix: Support Shoutcast HTTP responses like `ICY 200 OK`.
     * Fix: Don't unzip if there isn't a response body.
     * Fix: Don't leak gzip streams on redirects.
     * Fix: Don't do DNS lookups on invalid hosts.
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 6.4K bytes
    - Click Count (0)
  9. tests/test_custom_route_class.py

    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/a/": {
                        "get": {
                            "responses": {
                                "200": {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 3.3K bytes
    - Click Count (0)
  10. tests/test_param_include_in_schema.py

        client = TestClient(app)
        response = client.get(path, headers=headers)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_hidden_path():
        client = TestClient(app)
        response = client.get("/hidden_path/hidden_path")
        assert response.status_code == 200
        assert response.json() == {"hidden_path": "hidden_path"}
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 8.6K bytes
    - Click Count (0)
Back to Top