com.github.restup.test.BasicApiResponse Maven / Gradle / Ivy
package com.github.restup.test;
import java.util.Map;
import com.github.restup.test.resource.Contents;
public class BasicApiResponse implements ApiResponse {
private final int status;
private final Map headers;
private final Contents body;
public BasicApiResponse(int status, Map headers, Contents body) {
this.status = status;
this.headers = headers;
this.body = body;
}
protected BasicApiResponse(int status, Map headers, byte[] body) {
this(status, headers, Contents.of(body));
}
@Override
public int getStatus() {
return status;
}
@Override
public Map getHeaders() {
return headers;
}
@Override
public Contents getBody() {
return body;
}
}