* @param config
* the configuration for the rest client to build
* @return the rest client
*/
public RestClient buildRestClient(final Config config) {
HttpClient httpClient = new HttpClientBuilder().createHttpClient(config);
return new RestClientImpl(httpClient) {
@Override
protected URI createUri(String uriString, boolean escaped) throws URIException {
boolean useNewHttpUriFactory = config.getAsBoolean("http.client.use.new.http.uri.factory", false);
if (useNewHttpUriFactory) {