def fetch(self, url, prefer_cached=False):
        """
        Retrieves the contents of a URL

        :param url:
            The URL to download the content from

        :param prefer_cached:
            If a cached copy of the content is preferred

        :return: The bytes/string
        """

        # If there are extra params for the domain name, add them
        extra_params = self.settings.get('query_string_params')
        domain_name = urlparse(url).netloc
        if extra_params and domain_name in extra_params:
            params = urlencode(extra_params[domain_name])
            joiner = '?%s' if url.find('?') == -1 else '&%s'
            url += joiner % params

        with downloader(url, self.settings) as manager:
            content = manager.fetch(url, 'Error downloading repository.',
                prefer_cached)
        return content
dataset/ETHPy150Open JT5D/Alfred-Popclip-Sublime/Sublime Text 2/Package Control/package_control/clients/json_api_client.py/JSONApiClient.fetch/original