
org.zalando.logbook.HttpMessage 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 org.apiguardian.api.API;
import javax.annotation.Nullable;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.List;
import java.util.Map;
import static org.apiguardian.api.API.Status.STABLE;
@API(status = STABLE)
public interface HttpMessage {
String getProtocolVersion();
Origin getOrigin();
Map> getHeaders();
@Nullable
String getContentType();
Charset getCharset();
byte[] getBody() throws IOException;
default String getBodyAsString() throws IOException {
return new String(getBody(), getCharset());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy