docs: def _process_response(self, resp, out_folder=None):
          """ processes the response object"""
          CHUNK = 4056
          maintype = self._mainType(resp)
          contentDisposition = resp.headers.get('content-disposition')
          contentEncoding = resp.headers.get('content-encoding')
          contentType = resp.headers.get('content-type')
          contentLength = resp.headers.get('content-length')
          if maintype.lower() in ('image',
                                  'application/x-zip-compressed') or \
             contentType == 'application/x-zip-compressed' or \
             (contentDisposition is not None and \
              contentDisposition.lower().find('attachment;') > -1):
              fname = self._get_file_name(
                  contentDisposition=contentDisposition,
                  url=resp.geturl())
              if out_folder is None:
                  out_folder = tempfile.gettempdir()
              if contentLength is not None:
                  max_length = int(contentLength)
                  if max_length < CHUNK:
                      CHUNK = max_length
              file_name = os.path.join(out_folder, fname)
              with open(file_name, 'wb') as writer:
                  for data in self._chunk(response=resp):
                      writer.write(data)
                      del data
                  del writer
              return file_name
          else:
              read = ""
              for data in self._chunk(response=resp, size=4096):
                  if self.PY3 == True:
                      read += data.decode('utf-8')
                  else:
                      read += data
                  del data
              try:
                  return json.loads(read.strip())
              except:
                  return read
          return None