code: public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws IOException {
      NameNode.getNameNodeMetrics().numFileDataServletDoGet.inc();
      final UnixUserGroupInformation ugi = getUGI(request);
      final ClientProtocol nnproxy = createNameNodeProxy(ugi);
  
      try {
        final String path = request.getPathInfo() != null
          ? request.getPathInfo() : "/";
        FileStatus info = nnproxy.getFileInfo(path);
        if ((info != null) && !info.isDir()) {
          response.sendRedirect(createUri(info, ugi, nnproxy,
                request).toURL().toString());
        } else if (info == null){
          response.sendError(400, "cat: File not found " + path);
        } else {
          response.sendError(400, "cat: " + path + ": is a directory");
        }
      } catch (URISyntaxException e) {
        response.getWriter().println(e.toString());
      } catch (IOException e) {
        response.sendError(400, e.getMessage());
      }
    }
docs: Service a GET request as described below.
  Request:
  {@code
  GET http://<nn>:<port>/data[/<path>] HTTP/1.1
  }