Delete a resource.

        :param url: Endpoint
        :param params: parameters
        :return: Response body

        :raises PvApiError when something is wrong.

async def delete(self, url: str, params: dict = None):
        """
        Delete a resource.

        :param url: Endpoint
        :param params: parameters
        :return: Response body

        :raises PvApiError when something is wrong.
        """
        response = None
        try:
            with async_timeout.timeout(self._timeout, loop=self.loop):
                response = await self.websession.delete(url, params=params)
            return await check_response(response, [200, 204])
        except (asyncio.TimeoutError, aiohttp.ClientError) as error:
            _LOGGER.error("Failed to communicate with PowerView hub: %s", error)
            raise PvApiConnectionError
        finally:
            if response is not None:
                await response.release()