com.despegar.http.client.HttpResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-java-native-client Show documentation
Show all versions of http-java-native-client Show documentation
HTTP Java client without dependencies
package com.despegar.http.client;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
public class HttpResponse {
private int code;
private String message;
private Map> headers;
private byte[] body;
HttpResponse(int code, String message, Map> headers, byte[] body) {
super();
this.code = code;
this.message = message;
this.headers = headers;
this.body = body;
}
public int code() {
return this.code;
}
public String message() {
return this.message;
}
public Map> headers() {
return this.headers;
}
public byte[] body() {
return this.body;
}
@Override
public String toString() {
return "HttpResponse [code=" + this.code + ", message=" + this.message + ", headers=" + this.headers + ", body="
+ Arrays.toString(this.body) + "]";
}
}