Ejemplo n.º 1
0
 public static RequestParameters appendUriParameters(
     RequestParameters fromRequest, Map<String, String> fromUri) {
   RequestParameters parameters = new RequestParameters();
   parameters.addAllParameters(fromRequest.parameters);
   for (String key : fromUri.keySet()) {
     parameters.withUriParameter(key, fromUri.get(key));
   }
   return parameters;
 }
Ejemplo n.º 2
0
 private static void addParameters(
     HttpServletRequest httpServletRequest,
     Set<String> parameterNames,
     RequestParameters requestParameters,
     String queryString) {
   for (String parameterName : parameterNames) {
     RequestParameter.ParameterSource parameterSource =
         (queryString != null && queryString.contains(parameterName)) ? querystring : body;
     requestParameters.withParameter(
         parameterSource, parameterName, httpServletRequest.getParameterValues(parameterName));
   }
 }