Package com.couchbase.client.java.http
Class HttpResponse
java.lang.Object
com.couchbase.client.java.http.HttpResponse
HTTP status code and response content.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
content()
Returns the content of the HTTP response.Returns the content of the HTTP response interpreted as a UTF-8 string.int
Returns the HTTP status code returned by Couchbase Server.boolean
success()
Returns true if the status code is 2xx, otherwise false.toString()
-
Constructor Details
-
HttpResponse
-
-
Method Details
-
statusCode
public int statusCode()Returns the HTTP status code returned by Couchbase Server. -
content
public byte[] content()Returns the content of the HTTP response.- Returns:
- a non-null (but maybe empty) byte array.
-
contentAsString
Returns the content of the HTTP response interpreted as a UTF-8 string. -
success
public boolean success()Returns true if the status code is 2xx, otherwise false. -
toString
-