Skip to content

route_rules.utils Β€

Functions:

download async Β€

download(url: str) -> Response
Source code in src/route_rules/utils/_download.py
10
11
12
13
14
15
16
17
async def download(url: str) -> httpx.Response:
    response: httpx.Response = await client.get(url)
    response = response.raise_for_status()
    if response.extensions["hishel_from_cache"]:
        logger.info("Cache Hit: %s", url)
    else:
        logger.info("Cache Miss: %s", url)
    return response