import aiohttp


async def request_url(url: str, session: aiohttp.ClientSession) -> dict:
    """
    requests a abuseipdb api url and returns its data

    :param url: str, abuseipdb api url
    :param session: aiohttp.ClientSession, client session with api key in header
    :return: dict, data about an api
    """
    async with session.get(url) as response:
        if response.status == 200:
            return await response.json(encoding="utf-8")
        else:
            return {}