/** * Get a HTTP header as a single string value. * @param name The header name (not null) * @return The HTTP header value. If the HTTP header is present more than once then the values are joined together * and separated by a ',' character. */ default Optional<String> getHeaderValue(String name) { ObjectUtils.argumentNotNull(name, "Header name must be not null"); return getHeader(name).filter(l -> l != null && !l.isEmpty()).map(l -> l.get(0)); }