def _dump_response(http_response):
  """Converts to a string for printing debug messages.

  Does not read the body since that may consume the content.
  """
  output = 'HttpResponse\n  status: %s\n  reason: %s\n  headers:' % (
      http_response.status, http_response.reason)
  headers = get_headers(http_response)
  if isinstance(headers, dict):
    for header, value in headers.iteritems():
      output += '    %s: %s\n' % (header, value)
  else:
    for pair in headers:
      output += '    %s: %s\n' % (pair[0], pair[1])
  return output
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/atom/http_core.py/_dump_response/original