docs: def _fetch_url_data(self, url, username, password, verify, custom_headers):
          ''' Hit a given http url and return the stats lines '''
          # Try to fetch data from the stats URL
  
          auth = (username, password)
          url = "%s%s" % (url, STATS_URL)
          custom_headers.update(headers(self.agentConfig))
  
          self.log.debug("Fetching haproxy stats from url: %s" % url)
  
          response = requests.get(
              url, auth=auth, headers=custom_headers, verify=verify, timeout=self.default_integration_http_timeout
          )
          response.raise_for_status()
  
          # it only needs additional decoding in py3, so skip it if it's py2
          if PY2:
              return response.content.splitlines()
          else:
              content = response.content
  
              # If the content is a string, it can't be decoded again
              # But if it's bytes, it can be decoded.
              # So, check if it has the decode method
              decode_fn = getattr(content, "decode", None)
              if callable(decode_fn):
                  content = content.decode('utf-8')
  
              return content.splitlines()