Skip to content

Commit 407cbb1

Browse files
Merge pull request #464 from apjanke/okhttpclient-customizer
Add okHttpClientBuilder() for customizing the OkHttpClient
2 parents 4bacc79 + 265b35a commit 407cbb1

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/main/java/com/google/maps/OkHttpRequestHandler.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,18 @@ public Request authenticate(Route route, Response response) throws IOException {
154154
});
155155
}
156156

157+
/**
158+
* Gets a reference to the OkHttpClient.Builder used to build the OkHttpRequestHandler's
159+
* internal OkHttpClient. This allows you to fully customize the OkHttpClient that the resulting
160+
* OkHttpRequestHandler will make HTTP requests through.
161+
*
162+
* @return OkHttpClient.Builder that will produce the OkHttpClient used by the
163+
* OkHttpRequestHandler built by this.
164+
*/
165+
public OkHttpClient.Builder okHttpClientBuilder() {
166+
return builder;
167+
}
168+
157169
@Override
158170
public RequestHandler build() {
159171
OkHttpClient client = builder.build();

0 commit comments

Comments
 (0)