/** * Replaces all existing queries with the newly supplied url decoded queries. <br> * <br><br><b>relationship to JAXRS 2.0</b><br> <br> Like {@code WebTarget.queries}, except the * values can be templatized. <br> ex. <br> * <pre> * template.queries(ImmutableMultimap.of("Signature", "{signature}")); * </pre> * * @param queries if null, remove all queries. else value to replace all queries with. * @see #queries() */ public RequestTemplate queries(Map<String, Collection<String>> queries) { if (queries == null || queries.isEmpty()) { this.queries.clear(); } else { for (Entry<String, Collection<String>> entry : queries.entrySet()) { query(entry.getKey(), toArray(entry.getValue(), String.class)); } } return this; }
private RequestTemplate doQuery(boolean encoded, String name, Iterable<String> values) { if (values != null) { return doQuery(encoded, name, toArray(values, String.class)); } return doQuery(encoded, name, (String[]) null); }
public RequestTemplate header(String name, Iterable<String> values) { if (values != null) { return header(name, toArray(values, String.class)); } return header(name, (String[]) null); }