Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for trace_item (0.17 sec)

  1. tests/test_extra_routes.py

    
    @app.patch("/items/{item_id}")
    def patch_item(item_id: str, item: Item):
        return {"item_id": item_id, "item": item}
    
    
    @app.trace("/items/{item_id}")
    def trace_item(item_id: str):
        return JSONResponse(None, media_type="message/http")
    
    
    client = TestClient(app)
    
    
    def test_get_api_route():
        response = client.get("/items/foo")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  2. fastapi/routing.py

                name: str
                description: str | None = None
    
            app = FastAPI()
            router = APIRouter()
    
            @router.trace("/items/{item_id}")
            def trace_item(item_id: str):
                return None
    
            app.include_router(router)
            ```
            """
            return self.api_route(
                path=path,
                response_model=response_model,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  3. fastapi/applications.py

            ## Example
    
            ```python
            from fastapi import FastAPI
    
            app = FastAPI()
    
            @app.put("/items/{item_id}")
            def trace_item(item_id: str):
                return None
            ```
            """
            return self.router.trace(
                path,
                response_model=response_model,
                status_code=status_code,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
Back to top