Open himalacharya opened 3 years ago
not for me. I am getting:
Exception: No "request" or "websocket" argument on function "<function test at 0x7f2834c39e50>"
@himalacharya I don't understand how the code would work without the request
argument. Can you share a minimal example that reproduces it?
Hi @transfluxus , I ran into the same issue. What worked for me is simply to add:
@router.get("/")
@limiter.limit("5/minute")
async def current_transactions(request: Request):
"YOUR CODE"
return "something"
eventhough request: Request
is not used within your function
Hope that helps!
In relation to example in issue #25 , ratelimit works without using Request in endpoint. I havenot used Request in any endpoint of my application but ratelimit works. But documentation strongly suggests to use Request in endpoint. Example:
This works with example of issue #25