Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 534 for tenders (0.04 sec)

  1. docs_src/app_testing/tutorial004_py39.py

            assert items == {"foo": {"name": "Fighters"}, "bar": {"name": "Tenders"}}
    
            response = client.get("/items/foo")
            assert response.status_code == 200
            assert response.json() == {"name": "Fighters"}
    
            # After the requests is done, the items are still there
            assert items == {"foo": {"name": "Fighters"}, "bar": {"name": "Tenders"}}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  2. docs_src/additional_status_codes/tutorial001_py39.py

    from typing import Union
    
    from fastapi import Body, FastAPI, status
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: Union[str, None] = Body(default=None),
        size: Union[int, None] = Body(default=None),
    ):
        if item_id in items:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 684 bytes
    - Viewed (0)
  3. docs_src/app_testing/tutorial003_py39.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    items = {}
    
    
    @app.on_event("startup")
    async def startup_event():
        items["foo"] = {"name": "Fighters"}
        items["bar"] = {"name": "Tenders"}
    
    
    @app.get("/items/{item_id}")
    async def read_items(item_id: str):
        return items[item_id]
    
    
    def test_read_items():
        with TestClient(app) as client:
            response = client.get("/items/foo")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 528 bytes
    - Viewed (0)
  4. docs_src/events/tutorial001_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    items = {}
    
    
    @app.on_event("startup")
    async def startup_event():
        items["foo"] = {"name": "Fighters"}
        items["bar"] = {"name": "Tenders"}
    
    
    @app.get("/items/{item_id}")
    async def read_items(item_id: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 283 bytes
    - Viewed (0)
  5. docs_src/additional_responses/tutorial003_py39.py

            200: {
                "description": "Item requested by ID",
                "content": {
                    "application/json": {
                        "example": {"id": "bar", "value": "The bar tenders"}
                    }
                },
            },
        },
    )
    async def read_item(item_id: str):
        if item_id == "foo":
            return {"id": "foo", "value": "there goes my hero"}
        else:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 837 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_additional_responses/test_tutorial003.py

                                        "example": {
                                            "id": "bar",
                                            "value": "The bar tenders",
                                        },
                                    }
                                },
                            },
                            "422": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Headers.kt

        @JvmName("of")
        fun Map<String, String>.toHeaders(): Headers = commonToHeaders()
    
        @JvmName("-deprecated_of")
        @Deprecated(
          message = "function moved to extension",
          replaceWith = ReplaceWith(expression = "headers.toHeaders()"),
          level = DeprecationLevel.ERROR,
        )
        fun of(headers: Map<String, String>): Headers = headers.toHeaders()
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue May 27 14:51:25 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  8. docs/es/docs/advanced/response-headers.md

    ///
    
    ## Headers Personalizados { #custom-headers }
    
    Ten en cuenta que los headers propietarios personalizados se pueden agregar <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">usando el prefijo `X-`</a>.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/response-headers.md

    And as the `Response` can be used frequently to set headers and cookies, **FastAPI** also provides it at `fastapi.Response`.
    
    ///
    
    ## Custom Headers { #custom-headers }
    
    Keep in mind that custom proprietary headers can be added <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">using the `X-` prefix</a>.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  10. docs/pt/docs/advanced/response-headers.md

    ///
    
    ## Cabeçalhos personalizados { #custom-headers }
    
    Tenha em mente que cabeçalhos personalizados proprietários podem ser adicionados <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">usando o prefixo `X-`</a>.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.6K bytes
    - Viewed (0)
Back to top