com.sendgrid.Response Maven / Gradle / Ivy
package com.sendgrid;
import java.util.Map;
/**
* Class Response provides a standard interface to an API's response.
*/
public class Response {
public int statusCode;
public String body;
public Map headers;
/**
* Set the API's response.
*/
public Response(int statusCode, String responseBody, Map responseHeaders) {
this.statusCode = statusCode;
this.body = responseBody;
this.headers = responseHeaders;
}
public Response() {
this.reset();
}
/**
* Place the object into an empty state.
*/
public void reset() {
this.statusCode = 0;
this.body = "";
this.headers = null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy