- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 157 for outer (0.03 sec)
-
cmd/routers.go
// Add server metrics router registerMetricsRouter(router) // Add STS router always. registerSTSRouter(router) // Add KMS router registerKMSRouter(router) // Add API router registerAPIRouter(router) router.Use(globalMiddlewares...) return router, nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 3.9K bytes - Viewed (0) -
tests/test_router_redirect_slashes.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient def test_redirect_slashes_enabled(): app = FastAPI() router = APIRouter() @router.get("/hello/") def hello_page() -> str: return "Hello, World!" app.include_router(router) client = TestClient(app) response = client.get("/hello/", follow_redirects=False) assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jun 22 10:37:50 UTC 2023 - 974 bytes - Viewed (0) -
tests/test_ws_router.py
await websocket.close() @router.websocket("/router/{pathparam:path}") async def routerindexparams(websocket: WebSocket, pathparam: str, queryparam: str): await websocket.accept() await websocket.send_text(pathparam) await websocket.send_text(queryparam) await websocket.close() async def ws_dependency(): return "Socket Dependency" @router.websocket("/router-ws-depends/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 19:08:14 UTC 2023 - 7.5K bytes - Viewed (0) -
docs_src/bigger_applications/app_an/routers/users.py
from fastapi import APIRouter router = APIRouter() @router.get("/users/", tags=["users"]) async def read_users(): return [{"username": "Rick"}, {"username": "Morty"}] @router.get("/users/me", tags=["users"]) async def read_user_me(): return {"username": "fakecurrentuser"} @router.get("/users/{username}", tags=["users"]) async def read_user(username: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 407 bytes - Viewed (0) -
tests/test_generate_unique_id_function.py
app = FastAPI(generate_unique_id_function=custom_generate_unique_id) router = APIRouter() @app.post("/", response_model=List[Item], responses={404: {"model": List[Message]}}) def post_root(item1: Item, item2: Item): return item1, item2 # pragma: nocover @router.post( "/router", response_model=List[Item], responses={404: {"model": List[Message]}} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 13 15:10:26 UTC 2024 - 66.7K bytes - Viewed (0) -
tests/test_router_events.py
sub_router = APIRouter(lifespan=subrouter_lifespan) router = APIRouter(lifespan=router_lifespan) router.include_router(sub_router) app = FastAPI(lifespan=lifespan) app.include_router(router) @app.get("/") def main(request: Request) -> Dict[str, str]: assert request.state.app assert request.state.router assert request.state.sub_router
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:09:52 UTC 2024 - 7.3K bytes - Viewed (0) -
tests/test_empty_router.py
import pytest from fastapi import APIRouter, FastAPI from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.get("") def get_empty(): return ["OK"] app.include_router(router, prefix="/prefix") client = TestClient(app) def test_use_empty(): with client: response = client.get("/prefix")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 22:37:34 UTC 2023 - 805 bytes - Viewed (0) -
docs_src/bigger_applications/app/routers/items.py
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 @router.get("/{item_id}") async def read_item(item_id: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Nov 29 17:32:18 UTC 2020 - 1011 bytes - Viewed (0) -
cni/pkg/nodeagent/healthServer.go
func StartHealthServer() (installReady *atomic.Value, watchReady *atomic.Value) { router := http.NewServeMux() installReady, watchReady = initRouter(router) go func() { _ = http.ListenAndServe(":"+constants.ReadinessPort, router) }() return } func initRouter(router *http.ServeMux) (installReady *atomic.Value, watchReady *atomic.Value) { installReady = &atomic.Value{}
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Apr 15 01:29:35 UTC 2024 - 1.8K bytes - Viewed (0) -
docs_src/bigger_applications/app_an_py39/routers/users.py
from fastapi import APIRouter router = APIRouter() @router.get("/users/", tags=["users"]) async def read_users(): return [{"username": "Rick"}, {"username": "Morty"}] @router.get("/users/me", tags=["users"]) async def read_user_me(): return {"username": "fakecurrentuser"} @router.get("/users/{username}", tags=["users"]) async def read_user(username: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 407 bytes - Viewed (0)