import requests


def download_url_data(url, params=None):
    """
    Download the data from the given url and with given parameters
    from the jenkins job
    :param url: Jenkins job url
    :type url: str
    :param params: Parameters to be passed to the api
    :type params: str
    :return: Content of the request to the jenkins api
    :rtype: requests.content
    """
    res = None
    try:
        res = requests.get("%s" % url, params=params, timeout=15)
        return res.content
    except:
        print("[Error] url unreachable: %s" % url)
        res = None
    return res