|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.restdriver.serverdriver.http.response.DefaultResponse
public final class DefaultResponse
Our class which describes an HTTP response.
| Constructor Summary | |
|---|---|
DefaultResponse(org.apache.http.HttpResponse response,
long responseTime)
Constructor from apache HttpResponse. |
|
| Method Summary | |
|---|---|
org.codehaus.jackson.JsonNode |
asJson()
Returns the JSON response content as a JsonNode, or throws RuntimeMappingException |
Element |
asXml()
Returns the XML response content as an org.w3c.Element, or throws RuntimeMappingException |
String |
getContent()
What was the content of the response? |
List<Header> |
getHeaders()
What headers did the server send? |
long |
getResponseTime()
How long did the response take? |
int |
getStatusCode()
What was the response code? |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultResponse(org.apache.http.HttpResponse response,
long responseTime)
response - the HttpResponseresponseTime - time taken for the request in milliseconds| Method Detail |
|---|
public int getStatusCode()
Response
getStatusCode in interface Responsepublic String getContent()
Response
getContent in interface Responsepublic List<Header> getHeaders()
Response
getHeaders in interface Responsepublic long getResponseTime()
Response
getResponseTime in interface Responsepublic org.codehaus.jackson.JsonNode asJson()
Response
asJson in interface Responsepublic Element asXml()
Response
asXml in interface Responsepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||