|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.macromedia.net.HttpAgentResponse
This object represents the response from an http request. It contains all the of the data from the response (headers and the body) as well as error information if there was an error.
| Constructor Summary | |
HttpAgentResponse()
|
|
| Method Summary | |
byte[] |
getBody()
Get the body of the response. |
java.lang.String |
getBodyAsString()
Get the body of this response, but assume that it is text. |
java.lang.Throwable |
getException()
Get the exception associated with this request |
long |
getExecTime()
Access how long it took to run this request. |
java.lang.String |
getHeader(java.lang.String key)
Get a particular header |
java.util.Hashtable |
getHeaders()
Get all the headers as a map |
java.lang.String |
getKey()
Access the key. |
HttpAgentRequest |
getRequest()
Access the request that made this response. |
int |
getResponseCode()
Get the response code (200, 404, etc.) |
java.lang.String |
getResponseMessage()
Get the response message ("OK" or "Page not found"). |
boolean |
isOk()
Did we fail? You can call this method to see if you should treat this response as one to get the exception from, or if you should trust the data from it |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HttpAgentResponse()
| Method Detail |
public byte[] getBody()
public java.lang.String getBodyAsString()
public java.lang.String getHeader(java.lang.String key)
key - is the header key (example: Content-Type)
public java.util.Hashtable getHeaders()
public java.lang.String getResponseMessage()
public int getResponseCode()
public java.lang.Throwable getException()
public boolean isOk()
public java.lang.String getKey()
public HttpAgentRequest getRequest()
public long getExecTime()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||