// Create the REST request
StringBuilder URIStringBuilder = new StringBuilder().append(coordinatorUrl)
.append(URL_SEPARATOR)
.append(STORE_CLIENT_CONFIG_OPS)
.append(URL_SEPARATOR);
RestRequestBuilder requestBuilder = new RestRequestBuilder(new URI(URIStringBuilder.toString()));
byte[] payload = storeClientConfigAvro.getBytes("UTF-8");
// Create a HTTP POST request
requestBuilder.setMethod(requestType.POST.toString());
requestBuilder.setEntity(payload);
requestBuilder.setHeader(CONTENT_TYPE, "binary");
requestBuilder.setHeader(CONTENT_LENGTH, "" + payload.length);
String timeoutStr = Long.toString(this.config.getTimeoutConfig()
.getOperationTimeout(VoldemortOpCode.PUT_OP_CODE));
requestBuilder.setHeader(RestMessageHeaders.X_VOLD_REQUEST_TIMEOUT_MS, timeoutStr);
requestBuilder = setCommonRequestHeader(requestBuilder);
RestRequest request = requestBuilder.build();
Future<RestResponse> future = client.restRequest(request);
// This will block
RestResponse response = future.get();
final ByteString entity = response.getEntity();