I have a handling function decorated with the @enroute.rest.command decorator, so that my function receives a RestRequest instance, but I want to directly access the aiohttp.web.Request to directly access to the rel_url attribute. How can I do that?
My current code looks like:
from minos.networks import RestRequest, RestResponse, enroute
@enroute.rest.command("/products/create", "POST")
async def handle_product_create(request: RestRequest) -> RestResponse:
...
return RestResponse("created!)
The
minos.networks.RestRequestprovides theraw_requestattribute, which gives access to the inneraiohttp.web.Requestinstance, so that you can access any of its methods or attributes