/** * Adds a query parameter to this request builder. If there was already a query * parameter with this name the values will be added. * <p> * The case sensitivity can be set by this builder's * {@linkplain SimpleRequest.Builder#Builder(Method, String, boolean)} constructor. * * @param name the header name * @param values the values for this header * @return this builder */ public Builder withQueryParam(final String name, final List<String> values) { // available but not set query parameters are considered as available but with no value putValuesToMapOrDefault(queryParams, name, values, null, false); return this; }
/** * Adds a request header to this builder. If there was already a header with this * name the values will be added. * <p> * Headers are treated case insensitive. * * @param name the header name * @param values the values for this header * @return this builder */ public Builder withHeader(final String name, final List<String> values) { // available but not set headers are considered as empty putValuesToMapOrDefault(headers, name, values, "", true); return this; }
/** * Adds a response header to this builder. If there was already a header with this * name the values will be added. * <p> * Headers are treated case insensitive. * * @param name the header name * @param values the values for this header * @return this builder */ public Builder withHeader(final String name, final List<String> values) { // available but not set headers are considered as empty SimpleRequest.Builder.putValuesToMapOrDefault(headers, name, values, "", true); return this; }