Class HttpResponse


  • public class HttpResponse
    extends Object
    HTTP status code and response content.
    • Constructor Detail

      • HttpResponse

        @Internal
        public HttpResponse​(int statusCode,
                            byte[] content)
    • Method Detail

      • 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

        public String 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.