code: public static Map<String, String> getParameters(HttpServletRequest request) {
          Map<String, String> parameters = new HashMap<>();
          Enumeration<?> names = request.getParameterNames();
          while (names.hasMoreElements()) {
              String key = (String) names.nextElement();
              String value = request.getParameter(key);
              if (StringUtils.isNotEmpty(value)) {
                  parameters.put(key, value);
              }
          }
          return parameters;
      }
docs: Helps retrieve the parameters and its values as a Map
  
  @param request
  A {@link HttpServletRequest} that represents the request from which the parameters and their
  corresponding values are to be extracted.
  @return A {@link Map} that represents the parameters and their values