|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fourspaces.couchdb.CouchResponse
public class CouchResponse
The CouchResponse parses the HTTP response returned by the CouchDB server. This is almost never called directly by the user, but indirectly through the Session and Database objects.
Given a CouchDB response, it will determine if the request was successful (status 200,201,202), or was an error. If there was an error, it parses the returned json error message.
Method Summary | |
---|---|
net.sf.json.JSONObject |
getBodyAsJSON()
Returns the body of the response as a JSON Object (such as for a document) |
net.sf.json.JSONArray |
getBodyAsJSONArray()
Retrieves the body of the request as a JSONArray object. |
String |
getErrorId()
What was the error id? |
String |
getErrorReason()
what was the error reason given? |
String |
getHeader(String key)
Retrieves a specific header from the response (not really used anymore) |
boolean |
isOk()
Was the request successful? |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public String toString()
toString
in class Object
public net.sf.json.JSONArray getBodyAsJSONArray()
public boolean isOk()
public String getErrorId()
public String getErrorReason()
public net.sf.json.JSONObject getBodyAsJSON()
public String getHeader(String key)
key
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |