- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 222 for routers (0.08 sec)
-
docs/em/docs/how-to/custom-request-and-route.md
``` ## 🛃 `APIRoute` 🎓 📻 👆 💪 ⚒ `route_class` 🔢 `APIRouter`: ```Python hl_lines="26" {!../../docs_src/custom_request_and_route/tutorial003.py!} ``` 👉 🖼, *➡ 🛠️* 🔽 `router` 🔜 ⚙️ 🛃 `TimedRoute` 🎓, & 🔜 ✔️ ➕ `X-Response-Time` 🎚 📨 ⏮️ 🕰 ⚫️ ✊ 🏗 📨: ```Python hl_lines="13-20" {!../../docs_src/custom_request_and_route/tutorial003.py!}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Route.kt
* requires an IP address. The DNS server may return multiple IP addresses to attempt. * * Each route is a specific selection of these options. */ class Route( @get:JvmName("address") val address: Address, /** * Returns the [Proxy] of this route. * * **Warning:** This may disagree with [Address.proxy] when it is null. When the address's proxy * is null, the proxy selector is used.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.3K bytes - Viewed (0) -
internal/grid/manager.go
} return m, nil } // AddToMux will add the grid manager to the given mux. func (m *Manager) AddToMux(router *mux.Router, authReq func(r *http.Request) error) { router.Handle(m.routePath, m.Handler(authReq)) } // Handler returns a handler that can be used to serve grid requests. // This should be connected on RoutePath to the main server.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 10.6K bytes - Viewed (0) -
tests/test_dependency_overrides.py
@router.get("/router-depends/") async def router_depends(commons: dict = Depends(common_parameters)): return {"in": "router-depends", "params": commons} @router.get("/router-decorator-depends/", dependencies=[Depends(common_parameters)]) async def router_decorator_depends(): return {"in": "router-decorator-depends"} app.include_router(router) client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 15.4K 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) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt
val route = Route(address, proxy, inetSocketAddress) if (routeDatabase.shouldPostpone(route)) { postponedRoutes += route } else { routes += route } } if (routes.isNotEmpty()) { break } } if (routes.isEmpty()) { // We've exhausted all Proxies so fallback to the postponed routes. routes += postponedRoutes
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Mar 06 17:33:38 UTC 2024 - 7.2K 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_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) -
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) -
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)