code: public static String getInServiceURL(HttpServletRequest request, String path) {
          String contextPath = ((Request) request).getContext().getContextPath();
          int port = request.getServerPort();
  
          return getInServiceURL(port, contextPath, path);
      }
docs: Constructs URL for in service requests (e.g. calls for endpoint of this application)