Package com.moesif.api.http.response
Class HttpResponse
- java.lang.Object
-
- com.moesif.api.http.response.HttpResponse
-
- Direct Known Subclasses:
HttpStringResponse
public class HttpResponse extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpResponse(int _code, Map<String,String> _headers, InputStream _rawBody)HttpResponse(int _code, Map<String,String> _headers, InputStream _rawBody, org.apache.http.client.methods.HttpRequestBase _baseReq)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getHeaders()Headers of the http responseInputStreamgetRawBody()Raw body of the http responseintgetStatusCode()HTTP Status code of the http responsevoidshutdown()Shutdowns any pending http resources e.g., input streams and realses connection
-
-
-
Constructor Detail
-
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 Detail
-
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
-
-