old_contents: import logging
  from urllib.parse import urlsplit, urljoin
  from requests import get
  
  
  class HTTPClient:
      def __init__(self, base, user=None, password=None):
          self.base = base
          self.user = user
          self.password = password
  
      def get(self, url):
          url = urlsplit(url)
          url = url[2:]
          request_url = urljoin(self.base, url[0])
          if self.user is not None:
              response = get(request_url, auth=(self.user, self.password))
          else:
              response = get(request_url)
          assert response.status_code is 200, 'Error when requesting {}.'.format(request_url)
          return response.json()
  
new_contents: import logging
  from urllib.parse import urlsplit, urljoin
  from requests import get
  
  #TODO: move this somewhere sensible
  #TODO: useful error handling (CLI...)
  class HTTPClient:
      def __init__(self, base, user=None, password=None):
          self.base = base
          self.user = user
          self.password = password
  
      def get(self, url):
          url = urlsplit(url)
          url = url[2:]
          request_url = urljoin(self.base, url[0])
          if self.user is not None:
              response = get(request_url, auth=(self.user, self.password))
          else:
              response = get(request_url)
          assert response.status_code is 200, 'Error when requesting {}.'.format(request_url)
          return response.json()
  
subject: Add TODO