qbit/consul-client/src/main/java/io/advantageous/consul/endpoints/CatalogEndpoint.java
public List<String> getDatacenters() {

        URI uri = createURI("/datacenters");

        HTTP.Response httpResponse = HTTP.getResponse(uri.toString());

        if (httpResponse.code() == 200) {
            return fromJsonArray(httpResponse.body(), String.class);
        }
        die("Unable to retrieve the datacenters", uri, httpResponse.code(), httpResponse.body());
        return Collections.emptyList();
    }
public List<String> getDatacenters() {

        URI uri = createURI("/datacenters");

        HTTP.Response httpResponse = HTTP.getResponse(uri.toString());

        if (httpResponse.code() == 200) {
            return fromJsonArray(httpResponse.body(), String.class);
        }
        die("Unable to retrieve the datacenters", uri, httpResponse.code(), httpResponse.body());
        return Collections.emptyList();
    }
Retrieves all datacenters.
<p>
GET /v1/catalog/datacenters

@return A list of datacenter names.