diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e1be7ae..a6fb89f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## XX.XX.XX +* Added setting custom network request headers support for web platform. * Added a new function "addCustomNetworkRequestHeaders: customHeaderValues" for providing or overriding custom headers after init. * Default request method is now set to "POST" diff --git a/lib/src/web/countly_flutter_plugin.dart b/lib/src/web/countly_flutter_plugin.dart index 00aa203e..d12172f9 100644 --- a/lib/src/web/countly_flutter_plugin.dart +++ b/lib/src/web/countly_flutter_plugin.dart @@ -618,6 +618,8 @@ class CountlyFlutterPlugin { configMap['behavior_settings'] = config['sdkBehaviorSettings']; configMap['disable_behavior_settings_updates'] = config['sdkBehaviorSettingsUpdatesDisabled']; + configMap['headers'] = config['customNetworkRequestHeaders']; + configMap.removeWhere((key, value) => value == null); if (config['disableLocation'] != null && config['disableLocation'] == true) {