def _get_request_path(request) -> str:
    """Get the path from from any type of request object."""
    if hasattr(request, "path"):
        # aiohttp-style
        return request.path
    elif hasattr(request, "url"):
        # starlette-style
        return request.url.path
    raise TypeError(f"Don't know how to find the path for {type(request)}")