public class RestAPIBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_VALUE_API |
static String |
NULL_LABEL |
static String |
REVISIONS_API |
| Constructor and Description |
|---|
RestAPIBuilder() |
| Modifier and Type | Method and Description |
|---|---|
RestAPIBuilder |
addParam(String key,
String value) |
String |
buildKVApi()
User is responsible to configure the required endpoint, path and params ahead
|
String |
buildKVApi(QueryOptions options)
Build REST API for kv request, depending on the query options, the URI built can be different.
|
String |
buildRevisionsApi(QueryOptions options) |
RestAPIBuilder |
withEndpoint(String endpoint) |
RestAPIBuilder |
withPath(String path) |
public static final String KEY_VALUE_API
public static final String REVISIONS_API
public static final String NULL_LABEL
public RestAPIBuilder withEndpoint(String endpoint)
public RestAPIBuilder withPath(String path)
public RestAPIBuilder addParam(String key, String value)
public String buildKVApi(@NonNull QueryOptions options)
e.g., https://host.domain.io/kv https://host.domain.io/kv?key=abc https://host.domain.io/kv?key=abc* https://host.domain.io/kv?key=abc*&label=prod
options - is NonNull, query options used to build the KV APIpublic String buildRevisionsApi(@NonNull QueryOptions options)
public String buildKVApi()
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.