-
Notifications
You must be signed in to change notification settings - Fork 32
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.
java-sdk/core-httpclient-impl/src/main/java/com/optimizely/ab/OptimizelyHttpClient.java
Line 103 in 543c1c2
.setDefaultRequestConfig(HttpClientUtils.DEFAULT_REQUEST_CONFIG) |
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