org.zalando.riptide.httpclient.Headers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of riptide-httpclient Show documentation
Show all versions of riptide-httpclient Show documentation
Client side response routing with stream support
package org.zalando.riptide.httpclient;
import org.apache.http.client.methods.HttpUriRequest;
import org.springframework.http.HttpHeaders;
import static org.springframework.http.HttpHeaders.CONTENT_LENGTH;
import static org.springframework.http.HttpHeaders.TRANSFER_ENCODING;
final class Headers {
private Headers() {
}
static void writeHeaders(final HttpHeaders headers, final HttpUriRequest request) {
headers.forEach((name, values) ->
values.forEach(value ->
request.addHeader(name, value)));
request.removeHeaders(CONTENT_LENGTH);
request.removeHeaders(TRANSFER_ENCODING);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy