[android] #5536 - Adding GzipRequestInterceptor to Telemetry OkHttp Client

This commit is contained in:
Brad Leege
2016-07-18 09:43:21 -05:00
parent 371a8ef6b2
commit b03471bc8d

View File

@@ -726,7 +726,10 @@ public class MapboxEventManager {
.add("events.mapbox.com", "sha256/WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=")
.build();
OkHttpClient client = new OkHttpClient.Builder().certificatePinner(certificatePinner).build();
OkHttpClient client = new OkHttpClient.Builder()
.certificatePinner(certificatePinner)
.addInterceptor(new GzipRequestInterceptor())
.build();
RequestBody body = RequestBody.create(JSON, jsonArray.toString());
String url = eventsURL + "/events/v2?access_token=" + accessToken;