code: def image_server_response(self, api_version=None):
          
          headers = dict(self.headers)
          if (api_version < '1.1'):
              headers['Content-Type'] = 'text/xml'
              response = self.as_xml()
          else:
              headers['Content-Type'] = 'text/plain'
              response = self.as_txt()
          return(response, self.code, headers)
docs: Response, code and headers for image server error response.
  
          api_version selects the format (XML of 1.0). The return value is
          a tuple of
            response - body of HTTP response
            status - the HTTP status code
            headers - a dict of HTTP headers which will include the Content-Type
  
          As a side effect the routine sets self.content_type
          to the correct media type for the response.