code: def list_directory2(self, mdir, limit=None, marker=None):
          
          log.debug('ListDirectory %r', mdir)
  
          query = {}
          if limit:
              query["limit"] = limit
          if marker:
              query["marker"] = marker
  
          res, content = self._request(mdir, "GET", query=query)
          if res["status"] != "200":
              raise errors.MantaAPIError(res, content)
          lines = content.splitlines(False)
          dirents = []
          for line in lines:
              if not line.strip():
                  continue
              try:
                  dirents.append(json.loads(line.decode("utf-8")))
              except ValueError:
                  raise errors.MantaError('invalid directory entry: %r' % line)
          return res, dirents
docs: A lower-level version of `list_directory` that returns the
          response object (which includes the headers).
  
          ...
          @returns (res, dirents) {2-tuple}