code: def _log_http_request(method, url, headers=None, content=None):
          
          if method == 'POST' and url.endswith('/api/sessions'):
              # In Python 3 up to 3.5, json.loads() requires unicode strings.
              if sys.version_info[0] == 3 and sys.version_info[1] in (4, 5) and \
                      isinstance(content, six.binary_type):
                  content = content.decode('utf-8')
              # Because zhmcclient has built the request, we are not handling
              # any JSON parse errors from json.loads().
              content_dict = json.loads(content)
              content_dict['password'] = '********'
              content = json.dumps(content_dict)
          if headers and 'X-API-Session' in headers:
              headers = headers.copy()
              headers['X-API-Session'] = '********'
          HMC_LOGGER.debug("Request: %s %s, headers: %r, "
                           "content(max.1000): %.1000r",
                           method, url, headers, content)
docs: Log the HTTP request of an HMC REST API call, at the debug level.
  
          Parameters:
  
            method (:term:`string`): HTTP method name in upper case, e.g. 'GET'
  
            url (:term:`string`): HTTP URL (base URL and operation URI)
  
            headers (iterable): HTTP headers used for the request
  
            content (:term:`string`): HTTP body (aka content) used for the
              request