REST high-level client: fix _cluster/settings endpoint

The recent addition of the _cluster/settings API was merged together with another change that added encoding of the different URL parts. That broke the cluster PUT settings API straight-away. This commit fixes this problem. The '/' that's part of the /_cluster/settings endpoint should not be encoded.
This commit is contained in:
javanna 2018-02-15 17:40:43 +01:00 committed by Luca Cavanna
parent ebe5e8e635
commit 3e17185010
1 changed files with 1 additions and 1 deletions

View File

@ -537,7 +537,7 @@ public final class Request {
parameters.withTimeout(clusterUpdateSettingsRequest.timeout());
parameters.withMasterTimeout(clusterUpdateSettingsRequest.masterNodeTimeout());
String endpoint = buildEndpoint("_cluster/settings");
String endpoint = buildEndpoint("_cluster", "settings");
HttpEntity entity = createEntity(clusterUpdateSettingsRequest, REQUEST_BODY_CONTENT_TYPE);
return new Request(HttpPut.METHOD_NAME, endpoint, parameters.getParams(), entity);
}