org.zalando.logbook.HttpRequest 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 java.io.IOException;
import java.util.Optional;
import static org.apiguardian.api.API.Status.STABLE;
@API(status = STABLE)
public interface HttpRequest extends HttpMessage {
String getRemote();
String getMethod();
/**
* Absolute Request URI including scheme, host, port (unless http/80 or https/443), path and query string.
*
* Note that the URI may be invalid if the client issued an HTTP request using a malformed URL.
*
* @return the requested URI
*/
default String getRequestUri() {
return RequestURI.reconstruct(this);
}
String getScheme();
String getHost();
Optional getPort();
String getPath();
String getQuery();
// TODO void vs pseudo-function (mutable)
HttpRequest withBody() throws IOException;
// TODO require all implementations to be without-body by default
HttpRequest withoutBody();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy