org.zalando.logbook.UpdateHttpHeaders Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of logbook-api Show documentation
Show all versions of logbook-api Show documentation
HTTP request and response logging
package org.zalando.logbook;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import static org.zalando.logbook.Fold.fold;
interface UpdateHttpHeaders extends HttpHeaders {
@Override
default HttpHeaders update(
final String name,
final String... values) {
return update(name, Arrays.asList(values));
}
@Override
default HttpHeaders update(
final Map> headers) {
final HttpHeaders self = this;
return fold(headers.entrySet(), self, (result, entry) -> {
final String name = entry.getKey();
final List values = entry.getValue();
return result.update(name, values);
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy