![JAR search and dependency download from the Maven repository](/logo.png)
consul.HttpResp Maven / Gradle / Ivy
package consul;
import org.apache.http.HttpResponse;
/**
* A HTTP response delegate.
*/
public final class HttpResp {
private final HttpResponse response;
private final String body;
public HttpResp(final HttpResponse response, final String body) {
this.response = response;
this.body = body;
}
public int getStatus() {
return response.getStatusLine().getStatusCode();
}
public String getBody() {
return this.body;
}
public String getFirstHeader(final String name) {
return this.response.getFirstHeader(name).getValue();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy