|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.http.HttpResponse
public class HttpResponse
Represents an HTTP response returned by an AWS service in response to a service request.
Constructor Summary | |
---|---|
HttpResponse(Request<?> request,
org.apache.http.client.methods.HttpRequestBase httpRequest)
Constructs a new HttpResponse associated with the specified request. |
Method Summary | |
---|---|
void |
addHeader(String name,
String value)
Adds an HTTP header to the set associated with this response. |
InputStream |
getContent()
Returns the input stream containing the response content. |
Map<String,String> |
getHeaders()
Returns the HTTP headers returned with this response. |
org.apache.http.client.methods.HttpRequestBase |
getHttpRequest()
Returns the original http request associated with this response. |
Request<?> |
getRequest()
Returns the original request associated with this response. |
int |
getStatusCode()
Returns the HTTP status code (ex: 200, 404, etc) associated with this response. |
String |
getStatusText()
Returns the HTTP status text associated with this response. |
void |
setContent(InputStream content)
Sets the input stream containing the response content. |
void |
setStatusCode(int statusCode)
Sets the HTTP status code that was returned with this response. |
void |
setStatusText(String statusText)
Sets the HTTP status text returned with this response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpResponse(Request<?> request, org.apache.http.client.methods.HttpRequestBase httpRequest)
request
- The associated request that generated this response.httpRequest
- The underlying http request that generated this response.Method Detail |
---|
public Request<?> getRequest()
public org.apache.http.client.methods.HttpRequestBase getHttpRequest()
public Map<String,String> getHeaders()
public void addHeader(String name, String value)
name
- The name of the HTTP header.value
- The value of the HTTP header.public void setContent(InputStream content)
content
- The input stream containing the response content.public InputStream getContent()
public void setStatusText(String statusText)
statusText
- The HTTP status text (ex: "Not found") returned with this
response.public String getStatusText()
public void setStatusCode(int statusCode)
statusCode
- The HTTP status code (ex: 200, 404, etc) associated with this
response.public int getStatusCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |