def _make_request(
        self,
        url: str,
        method: str = "get",
        headers: dict = {},
        auth: tuple = (),
        params: dict = {},
        data: dict = {},
        json_data: dict = {},
        verify: bool = True,
        sort: bool = True,
        no_cache: bool = False,
    ) -> requests.Response | None:
        """Helper function. Performs an HTTP request on ``source`` and returns request object.

        Args:
            method: Optional HTTP method to use, e.g. "get" or "post".
            headers: Optional headers to be added to the HTTP request.
            auth: Username / password tuple to be sent along with the HTTP request.
            params: Optional param to be added to the HTTP GET request.
            data: Optional param to be added to the HTTP POST request.
            verify: Enforce (True) or skip (False) SSL verification.
            no_cache: Return the requests content even if they're older than the last run.

        Returns:
            requests object.
        """
        if json_data:
            response = getattr(requests, method.lower())(
                url,
                headers=headers,
                auth=auth,
                proxies=yeti_config.get("proxy"),
                params=params,
                json=json_data,
                verify=verify,
                stream=True,
            )
        else:
            response = getattr(requests, method.lower())(
                url,
                headers=headers,
                auth=auth,
                proxies=yeti_config.get("proxy"),
                params=params,
                data=data,
                verify=verify,
                stream=True,
            )

        if response.status_code != 200:
            raise RuntimeError(f"{url} returned code: {response.status_code}")

        if not sort:
            return response

        if no_cache:
            return response

        last_modified_header = response.headers.get("Last-Modified")
        if self.last_run is not None and last_modified_header:
            last_modified = parser.parse(last_modified_header)
            if self.last_run > last_modified:
                msg = (
                    f"{url}: Last-Modified header ({last_modified_header}) "
                    "before last-run ({self.last_run})"
                )
                logging.debug(msg)
                return

        return response
Helper function. Performs an HTTP request on ``source`` and returns request object.

        Args:
            method: Optional HTTP method to use, e.g. "get" or "post".
            headers: Optional headers to be added to the HTTP request.
            auth: Username / password tuple to be sent along with the HTTP request.
            params: Optional param to be added to the HTTP GET request.
            data: Optional param to be added to the HTTP POST request.
            verify: Enforce (True) or skip (False) SSL verification.
            no_cache: Return the requests content even if they're older than the last run.

        Returns:
            requests object.
        
core/schemas/task.py