Headers for this Request. @param headers to use. @return a RequestTemplate for chaining.
(Map<String, Collection<String>> headers)
| 850 | * @return a RequestTemplate for chaining. |
| 851 | */ |
| 852 | public RequestTemplate headers(Map<String, Collection<String>> headers) { |
| 853 | if (headers != null && !headers.isEmpty()) { |
| 854 | headers.forEach(this::header); |
| 855 | } else { |
| 856 | this.headers.clear(); |
| 857 | } |
| 858 | return this; |
| 859 | } |
| 860 | |
| 861 | /** |
| 862 | * Returns an copy of the Headers for this request. |