File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed
core/src/main/java/com/ibm/watson/developer_cloud Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -226,17 +226,18 @@ public OkHttpClient createHttpClient() {
226226 * Configures the current {@link OkHttpClient} instance based on the passed-in options.
227227 *
228228 * @param options the {@link HttpConfigOptions} object for modifying the client
229+ * @return the client
229230 */
230- public void configureClient (HttpConfigOptions options ) {
231- if (options == null ) {
232- return ;
231+ public OkHttpClient configureClient (HttpConfigOptions options ) {
232+ if (options != null ) {
233+ if (options .shouldDisableSslVerification ()) {
234+ disableSslVerification ();
235+ }
236+ if (options .getProxy () != null ) {
237+ setProxy (options .getProxy ());
238+ }
233239 }
234240
235- if (options .shouldDisableSslVerification ()) {
236- disableSslVerification ();
237- }
238- if (options .getProxy () != null ) {
239- setProxy (options .getProxy ());
240- }
241+ return okHttpClient ;
241242 }
242243}
Original file line number Diff line number Diff line change @@ -167,12 +167,12 @@ protected OkHttpClient configureHttpClient() {
167167 }
168168
169169 /**
170- * Configures the inner HTML client based on the passed-in options.
170+ * Configures the {@link OkHttpClient} based on the passed-in options.
171171 *
172172 * @param options the {@link HttpConfigOptions} object for modifying the client
173173 */
174174 public void configureClient (HttpConfigOptions options ) {
175- HttpClientSingleton .getInstance ().configureClient (options );
175+ client = HttpClientSingleton .getInstance ().configureClient (options );
176176 }
177177
178178 /**
You can’t perform that action at this time.
0 commit comments