Class HttpResponse

java.lang.Object
com.moesif.api.http.response.HttpResponse
Direct Known Subclasses:
HttpStringResponse

public class HttpResponse extends Object
  • Constructor Details

    • HttpResponse

      public HttpResponse(int _code, Map<String,String> _headers, InputStream _rawBody)
      Parameters:
      _code - The HTTP status code
      _headers - The HTTP headers read from response
      _rawBody - The raw data returned by the HTTP request
    • HttpResponse

      public HttpResponse(int _code, Map<String,String> _headers, InputStream _rawBody, org.apache.http.client.methods.HttpRequestBase _baseReq)
      Parameters:
      _code - The HTTP status code
      _headers - The HTTP headers read from response
      _rawBody - The raw data returned by the HTTP request
      _baseReq - The underlying http base request from the apache http library
  • Method Details

    • getStatusCode

      public int getStatusCode()
      HTTP Status code of the http response
      Returns:
      the HTTP status code
    • getHeaders

      public Map<String,String> getHeaders()
      Headers of the http response
      Returns:
      the HTTP response headers
    • getRawBody

      public InputStream getRawBody()
      Raw body of the http response
      Returns:
      the raw HTTP body
    • shutdown

      public void shutdown()
      Shutdowns any pending http resources e.g., input streams and realses connection