Skip to content

Commit

Permalink
Added documentation for CouchbaseResponse.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Wiederhold committed Mar 21, 2011
1 parent 81662bf commit 42d4d0e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/com/couchbase/cli/CouchbaseResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,32 @@
import org.apache.http.NameValuePair;
import org.apache.http.protocol.HTTP;

/**
* Holds details from a REST response.
*/
public class CouchbaseResponse {
HttpResponse response;
private HttpResponse response;

/**
* Creates a CouchbaseResponse.
* @param response The http response from the server.
*/
public CouchbaseResponse(HttpResponse response) {
this.response = response;
}

/**
* Gets the return code for the response.
* @return The return code.
*/
public int getReturnCode() {
return response.getStatusLine().getStatusCode();
}

/**
* Gets the content in the body ofn the http response.
* @return
*/
public String getBody() {
HttpEntity entity = response.getEntity();

Expand Down

0 comments on commit 42d4d0e

Please sign in to comment.