diff --git a/CHANGELOG.md b/CHANGELOG.md index 755ca75..960d436 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.9.4 + +* Fix: Drop x- prefix from unleash headers + ## 1.9.3 * Chore: Sync x-unleash-sdk version scheme with other SDKs diff --git a/example/pubspec.lock b/example/pubspec.lock index a623f84..5e8271a 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -355,7 +355,7 @@ packages: path: ".." relative: true source: path - version: "1.9.2" + version: "1.9.4" uuid: dependency: transitive description: diff --git a/lib/metrics.dart b/lib/metrics.dart index 6d10c23..127c47d 100644 --- a/lib/metrics.dart +++ b/lib/metrics.dart @@ -156,9 +156,9 @@ class Metrics { 'Cache': 'no-cache', 'Content-Type': 'application/json', 'Authorization': clientKey, - 'x-unleash-appname': appName, - 'x-unleash-connection-id': connectionId, - 'x-unleash-sdk': sdkName, + 'unleash-appname': appName, + 'unleash-connection-id': connectionId, + 'unleash-sdk': sdkName, }; final request = diff --git a/lib/unleash_proxy_client_flutter.dart b/lib/unleash_proxy_client_flutter.dart index 5bb075c..4fce242 100644 --- a/lib/unleash_proxy_client_flutter.dart +++ b/lib/unleash_proxy_client_flutter.dart @@ -157,7 +157,7 @@ class UnleashClient extends EventEmitter { this.customHeaders = const {}, this.impressionDataAll = false, // bump on each release, overwrite in tests, do not change in client code - this.sdkName = 'unleash-client-flutter:1.9.3', + this.sdkName = 'unleash-client-flutter:1.9.4', this.experimental}) { _init(); metrics = Metrics( @@ -223,9 +223,9 @@ class UnleashClient extends EventEmitter { final headers = { 'Accept': 'application/json', 'Cache': 'no-cache', - 'x-unleash-appname': appName, - 'x-unleash-connection-id': connectionId, - 'x-unleash-sdk': sdkName, + 'unleash-appname': appName, + 'unleash-connection-id': connectionId, + 'unleash-sdk': sdkName, }; headers[headerName] = clientKey; headers.addAll(customHeaders); diff --git a/pubspec.yaml b/pubspec.yaml index ed856a3..0510554 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A Flutter/Dart client that can be used together with the unleash-pr homepage: https://github.com/Unleash/unleash_proxy_client_flutter repository: https://github.com/Unleash/unleash_proxy_client_flutter issue_tracker: https://github.com/Unleash/unleash_proxy_client_flutter -version: 1.9.3 +version: 1.9.4 environment: sdk: ">=2.18.0 <4.0.0" diff --git a/test/unleash_proxy_client_flutter_test.dart b/test/unleash_proxy_client_flutter_test.dart index 34080f7..a524242 100644 --- a/test/unleash_proxy_client_flutter_test.dart +++ b/test/unleash_proxy_client_flutter_test.dart @@ -195,9 +195,9 @@ void main() { { 'Accept': 'AcceptType', 'Cache': 'no-cache', - 'x-unleash-appname': 'flutter-test', - 'x-unleash-connection-id': '1234', - 'x-unleash-sdk': 'unleash-client-flutter:1.0.0', + 'unleash-appname': 'flutter-test', + 'unleash-connection-id': '1234', + 'unleash-sdk': 'unleash-client-flutter:1.0.0', 'CustomHeader': 'CustomHeaderValue', 'X-Custom': 'CustomExtension' } @@ -227,9 +227,9 @@ void main() { { 'Accept': 'application/json', 'Cache': 'no-cache', - 'x-unleash-appname': 'flutter-test', - 'x-unleash-connection-id': '1234', - 'x-unleash-sdk': 'unleash-client-flutter:1.0.0', + 'unleash-appname': 'flutter-test', + 'unleash-connection-id': '1234', + 'unleash-sdk': 'unleash-client-flutter:1.0.0', 'CustomHeader': 'proxy-123', } ] @@ -1163,9 +1163,9 @@ void main() { { 'Accept': 'application/json', 'Cache': 'no-cache', - 'x-unleash-appname': 'flutter-test', - 'x-unleash-connection-id': '1234', - 'x-unleash-sdk': 'unleash-client-flutter:1.0.0', + 'unleash-appname': 'flutter-test', + 'unleash-connection-id': '1234', + 'unleash-sdk': 'unleash-client-flutter:1.0.0', 'Authorization': 'proxy-123', } ], @@ -1175,9 +1175,9 @@ void main() { { 'Accept': 'application/json', 'Cache': 'no-cache', - 'x-unleash-appname': 'flutter-test', - 'x-unleash-connection-id': '1234', - 'x-unleash-sdk': 'unleash-client-flutter:1.0.0', + 'unleash-appname': 'flutter-test', + 'unleash-connection-id': '1234', + 'unleash-sdk': 'unleash-client-flutter:1.0.0', 'Authorization': 'proxy-123', 'If-None-Match': 'ETagValue' } @@ -1211,9 +1211,9 @@ void main() { { 'Accept': 'application/json', 'Cache': 'no-cache', - 'x-unleash-appname': 'flutter-test', - 'x-unleash-connection-id': '1234', - 'x-unleash-sdk': 'unleash-client-flutter:1.0.0', + 'unleash-appname': 'flutter-test', + 'unleash-connection-id': '1234', + 'unleash-sdk': 'unleash-client-flutter:1.0.0', 'Authorization': 'proxy-123', } ], @@ -1223,9 +1223,9 @@ void main() { { 'Accept': 'application/json', 'Cache': 'no-cache', - 'x-unleash-appname': 'flutter-test', - 'x-unleash-connection-id': '1234', - 'x-unleash-sdk': 'unleash-client-flutter:1.0.0', + 'unleash-appname': 'flutter-test', + 'unleash-connection-id': '1234', + 'unleash-sdk': 'unleash-client-flutter:1.0.0', 'Authorization': 'proxy-123', } ] @@ -1366,9 +1366,9 @@ void main() { 'Accept': 'application/json', 'Cache': 'no-cache', 'Authorization': 'proxy-123', - 'x-unleash-appname': 'flutter-test', - 'x-unleash-connection-id': '1234', - 'x-unleash-sdk': 'unleash-client-flutter:1.0.0', + 'unleash-appname': 'flutter-test', + 'unleash-connection-id': '1234', + 'unleash-sdk': 'unleash-client-flutter:1.0.0', }, payload ], @@ -1419,9 +1419,9 @@ void main() { 'Accept': 'application/json', 'Cache': 'no-cache', 'Authorization': 'proxy-123', - 'x-unleash-appname': 'flutter-test', - 'x-unleash-connection-id': '1234', - 'x-unleash-sdk': 'unleash-client-flutter:1.0.0', + 'unleash-appname': 'flutter-test', + 'unleash-connection-id': '1234', + 'unleash-sdk': 'unleash-client-flutter:1.0.0', }, payload ],