DESCRIPTION

JCBC-983: Simple client for cluster REST API

Motivation
----------
The Couchbase cluster exposes a REST API, of which some methods are
exposed as native Java methods on the SDK. It would be useful to offer
a simple mean of querying the other endpoints from within the SDK.

To that end, the RestApiRequest message was added to the core and now
needs to be exposed in the client itself.

Modifications
-------------
Added a ClusterApiClient class that can be used to prepare API requests
(as RestBuilder objects) and execute them synchronously.

Added an AsyncClusterApiClient class that can be used to prepare API
requests (as AsyncRestBuilder objects) and execute them asynchronously.

Both builders implement the marker interface IRestBuilder and have
several methods that can be chained together to build the full request.
The request can then be executed by calling the execute() methods.

Result
------
A simple way of querying the cluster REST API is available directly in
the Java SDK. Convenience methods for both JSON and Url-Encoded form
bodies are exposed.

Change-Id: Icc383f918429a16a83ce44d539f92d21a0b2c09b


COMMENTS

author: Estrella Humphrey
date: 2016-07-27 09:45:54.914000000

Uploaded patch set 6.

-------------------------------------
author: Tate Garrett
date: 2016-07-28 14:12:10.230000000

Change has been successfully cherry-picked as 9557d8f7d2d16dcf50da5a73306f30bd6ae7f93b by Estrella Humphrey

-------------------------------------
