- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 197 for router2 (0.03 sec)
-
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py
) async def read_with_get_token(): return {"message": "Admin Access"} router = APIRouter(dependencies=[Security(oauth2_scheme, scopes=["read"])]) @router.get("/items/") async def read_items(token: Optional[str] = Depends(oauth2_scheme)): return {"token": token} @router.post("/items/") async def create_item( token: Optional[str] = Security(oauth2_scheme, scopes=["read", "write"]),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.6K bytes - Viewed (0) -
cmd/crossdomain-xml-handler_test.go
"testing" "github.com/minio/mux" ) // Test cross domain xml handler. func TestCrossXMLHandler(t *testing.T) { // Server initialization. router := mux.NewRouter().SkipClean(true).UseEncodedPath() handler := setCrossDomainPolicyMiddleware(router) srv := httptest.NewServer(handler) resp, err := http.Get(srv.URL + crossDomainXMLEntity) if err != nil { t.Fatal(err) }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sat Jul 08 14:31:42 UTC 2023 - 1.3K bytes - Viewed (0) -
docs/en/docs/advanced/openapi-callbacks.md
/// ### Add the callback router { #add-the-callback-router } At this point you have the *callback path operation(s)* needed (the one(s) that the *external developer* should implement in the *external API*) in the callback router you created above. Now use the parameter `callbacks` in *your API's path operation decorator* to pass the attribute `.routes` (that's actually just a `list` of routes/*path operations*) from that callback router:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 8K bytes - Viewed (0) -
tests/test_modules_same_name_body/app/main.py
from fastapi import FastAPI from . import a, b app = FastAPI() app.include_router(a.router, prefix="/a")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 28 17:35:16 UTC 2019 - 150 bytes - Viewed (0) -
tests/test_modules_same_name_body/app/a.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 160 bytes - Viewed (0) -
tests/test_annotated.py
assert response.json() == {"foo": "baz"} def test_nested_router(): app = FastAPI() router = APIRouter(prefix="/nested") @router.get("/test") async def test(var: Annotated[str, Query()] = "bar"): return {"foo": var} app.include_router(router) client = TestClient(app) response = client.get("/nested/test") assert response.status_code == 200
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/AbstractCacheTest.java
counter1.recordEviction(); } SimpleStatsCounter counter2 = new SimpleStatsCounter(); for (int i = 0; i < 27; i++) { counter2.recordHits(1); } for (int i = 0; i < 31; i++) { counter2.recordLoadSuccess(i); totalLoadTime += i; } for (int i = 0; i < 37; i++) { counter2.recordLoadException(i); totalLoadTime += i; }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 6.4K bytes - Viewed (0) -
tests/test_default_response_class_router.py
router_b_a_c_override, prefix="/c", default_response_class=HTMLResponse ) router_b_override.include_router(router_b_a, prefix="/a") router_a.include_router(router_a_a, prefix="/a") router_a.include_router( router_a_b_override, prefix="/b", default_response_class=PlainTextResponse ) app.include_router(router_a, prefix="/a") app.include_router( router_b_override, prefix="/b", default_response_class=PlainTextResponse )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Mar 01 20:49:20 UTC 2020 - 5K bytes - Viewed (0) -
tests/test_default_response_class.py
) router_b_override.include_router(router_b_a, prefix="/a") router_a.include_router(router_a_a, prefix="/a") router_a.include_router( router_a_b_override, prefix="/b", default_response_class=PlainTextResponse ) app.include_router(router_a, prefix="/a") app.include_router( router_b_override, prefix="/b", default_response_class=PlainTextResponse )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Mar 01 20:49:20 UTC 2020 - 5.2K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial001_an_py39.py
request = GzipRequest(request.scope, request.receive) return await original_route_handler(request) return custom_route_handler app = FastAPI() app.router.route_class = GzipRoute @app.post("/sum") async def sum_numbers(numbers: Annotated[list[int], Body()]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 988 bytes - Viewed (0)