Skip to content

Commit 62d0153

Browse files
feat: network headers example
1 parent 3771f93 commit 62d0153

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app-java/src/main/java/ly/count/java/demo/Example.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,14 @@ public static void main(String[] args) throws Exception {
210210
}
211211
}
212212

213+
Map<String, String> customNetworkRequestHeaders = new ConcurrentHashMap<>();
214+
customNetworkRequestHeaders.put("X-Countly-Example", "true");
215+
customNetworkRequestHeaders.put("X-Countly-Example-Version", "1.0");
216+
213217
Config config = new Config(COUNTLY_SERVER_URL, COUNTLY_APP_KEY, sdkStorageRootDirectory)
214218
.setLoggingLevel(Config.LoggingLevel.DEBUG)
215219
.setDeviceIdStrategy(Config.DeviceIdStrategy.UUID)
220+
.addCustomNetworkRequestHeaders(customNetworkRequestHeaders)
216221
.enableFeatures(Config.Feature.Events, Config.Feature.Sessions, Config.Feature.CrashReporting, Config.Feature.Views, Config.Feature.UserProfiles, Config.Feature.Location, Config.Feature.Feedback)
217222
.setRequiresConsent(true)
218223
//.enableParameterTamperingProtection("test-salt-checksum")

0 commit comments

Comments
 (0)