com.stackmob.sdkapi.http.response
Class HttpResponse

java.lang.Object
  extended by com.stackmob.sdkapi.http.response.HttpResponse

public class HttpResponse
extends Object


Constructor Summary
protected HttpResponse(Integer code, Set<Header> headers, String body)
          create a new HTTP response
 
Method Summary
 String getBody()
          get the response body
 Integer getCode()
          get the response code
 Set<Header> getHeaders()
          get the response headers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpResponse

protected HttpResponse(Integer code,
                       Set<Header> headers,
                       String body)
create a new HTTP response

Parameters:
code - the response code
headers - the response headers
body - the response body
Method Detail

getCode

public Integer getCode()
get the response code

Returns:
the response code

getHeaders

public Set<Header> getHeaders()
get the response headers

Returns:
a list of the response headers. this list is not sorted

getBody

public String getBody()
get the response body

Returns:
the response body, or the empty string if there was none


Copyright © 2012 StackMob. All Rights Reserved.