All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sendgrid.Response Maven / Gradle / Ivy

There is a newer version: 4.5.1
Show newest version
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