Closed
Description
WIth the older version of the SDK because you were calling to get the json
file yourself you were creating the ClosableHttpClient yourself and using that to get the file.
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet httpget = new HttpGet(configEndpoint);
RequestConfig requestConfig = RequestConfig.copy(defaultRequestConfig)
.setProxy(new HttpHost(proxyHost, proxyPort))
.build();
httpget.setConfig(requestConfig);
With the new OptimizelyFactory it allows you to use withOptimizelyHttpClient
but the OptimizelyHttpClient
builder doesn't let your define specific HttpClient
settings.
EventHandler eventHandler = AsyncEventHandler.builder()
.withQueueCapacity(20000)
.withNumWorkers(5)
.build();
ProjectConfigManager projectConfigManager = HttpProjectConfigManager.builder()
.withSdkKey(sdkKey)
.withOptimizelyHttpClient(OptimizelyHttpClient.builder().build())
.withPollingInterval(30, TimeUnit.MINUTES)
.build();
Optimizely optimizely = Optimizely.builder()
.withConfigManager(projectConfigManager)
.withEventHandler(eventHandler)
.build();
Metadata
Metadata
Assignees
Labels
No labels