io.github.shoothzj.http.client.facade.HttpResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-client-facade Show documentation
Show all versions of http-client-facade Show documentation
Http client abstracts multiple underlying HTTP clients, such as Jdk and OkHttp, and provides a unified API
The newest version!
package io.github.shoothzj.http.client.facade;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Map;
public class HttpResponse {
private final int statusCode;
@Nullable
private final byte[] body;
private final Map> headers;
public HttpResponse(int statusCode, @Nullable byte[] body, Map> headers) {
this.statusCode = statusCode;
this.body = body;
this.headers = headers;
}
public int statusCode() {
return statusCode;
}
@Nullable
public byte[] body() {
return body;
}
public Map> headers() {
return headers;
}
}