public class OkHttpClientImpl extends Object implements HttpClient
| Constructor and Description |
|---|
OkHttpClientImpl(GoogleAnalyticsConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected okhttp3.OkHttpClient |
createHttpClient(GoogleAnalyticsConfig config)
HTTP Client that uses the OkHttp library for request/response.
|
boolean |
isBatchSupported() |
java8.util.concurrent.CompletableFuture<HttpResponse> |
post(HttpRequest req) |
java8.util.concurrent.CompletableFuture<HttpBatchResponse> |
postBatch(HttpBatchRequest batchReq) |
public OkHttpClientImpl(GoogleAnalyticsConfig config)
public void close()
throws Exception
close in interface AutoCloseableExceptionprotected okhttp3.OkHttpClient createHttpClient(GoogleAnalyticsConfig config) throws RuntimeException
config - the configuration to use while building OkHttpClientRuntimeException - if unsupported configurations are specifiedpublic java8.util.concurrent.CompletableFuture<HttpResponse> post(HttpRequest req)
post in interface HttpClientpublic java8.util.concurrent.CompletableFuture<HttpBatchResponse> postBatch(HttpBatchRequest batchReq)
postBatch in interface HttpClientpublic boolean isBatchSupported()
isBatchSupported in interface HttpClientCopyright © Sep 2013–2018 Mike Hardy. All rights reserved.