From 33ce7a26417327e36cf7afab853f6e164acaa6fb Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 21 Mar 2025 16:06:42 +0000 Subject: [PATCH] Update code in endpoints/route.get.py --- endpoints/route.get.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/endpoints/route.get.py b/endpoints/route.get.py index e69de29..070a362 100644 --- a/endpoints/route.get.py +++ b/endpoints/route.get.py @@ -0,0 +1,22 @@ +from fastapi import APIRouter, HTTPException +from fastapi.requests import Request + +router = APIRouter() + +routes = [] # In-memory storage + +@router.get("/route") +async def get_route(request: Request): + """Demo route endpoint""" + if request.method != "GET": + raise HTTPException(status_code=405, detail="Method not allowed") + + return { + "message": "Route retrieved successfully", + "method": "GET", + "_verb": "get", + "features": { + "rate_limit": 100, + "expires_in": 3600 + } + } \ No newline at end of file