- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 43 for GET (0.23 sec)
-
docs_src/response_headers/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 309 bytes - Viewed (0) -
docs_src/dependencies/tutorial001.py
async def common_parameters( q: Union[str, None] = None, skip: int = 0, limit: int = 100 ): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: dict = Depends(common_parameters)): return commons @app.get("/users/") async def read_users(commons: dict = Depends(common_parameters)):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 442 bytes - Viewed (0) -
docs_src/custom_response/tutorial001.py
from fastapi import FastAPI from fastapi.responses import UJSONResponse app = FastAPI() @app.get("/items/", response_class=UJSONResponse) async def read_items():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 197 bytes - Viewed (0) -
docs_src/conditional_openapi/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 281 bytes - Viewed (0) -
docs_src/extending_openapi/tutorial001.py
from fastapi import FastAPI from fastapi.openapi.utils import get_openapi app = FastAPI() @app.get("/items/") async def read_items(): return [{"name": "Foo"}] def custom_openapi(): if app.openapi_schema: return app.openapi_schema openapi_schema = get_openapi( title="Custom title", version="2.5.0", summary="This is a very custom OpenAPI schema",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 737 bytes - Viewed (0) -
docs_src/wsgi/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue May 09 14:32:00 GMT 2023 - 443 bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial001.py
body = gzip.decompress(body) self._body = body return self._body class GzipRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: request = GzipRequest(request.scope, request.receive)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 973 bytes - Viewed (0) -
docs_src/websockets/tutorial001.py
ws.send(input.value) input.value = '' event.preventDefault() } </script> </body> </html> """ @app.get("/") async def get(): return HTMLResponse(html) @app.websocket("/ws") async def websocket_endpoint(websocket: WebSocket): await websocket.accept() while True: data = await websocket.receive_text()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1.4K bytes - Viewed (0) -
docs_src/advanced_middleware/tutorial001.py
from fastapi import FastAPI from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware app = FastAPI() app.add_middleware(HTTPSRedirectMiddleware) @app.get("/") async def main():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 231 bytes - Viewed (0) -
docs_src/cors/tutorial001.py
"http://localhost:8080", ] app.add_middleware( CORSMiddleware, allow_origins=origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/") async def main():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 459 bytes - Viewed (0)