Skip to content

Commit

Permalink
fix: drop x prefix (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Jan 30, 2025
1 parent f3cf9f8 commit ed641cf
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.9.2"
version: "1.9.4"
uuid:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions lib/metrics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
8 changes: 4 additions & 4 deletions lib/unleash_proxy_client_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
48 changes: 24 additions & 24 deletions test/unleash_proxy_client_flutter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down Expand Up @@ -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',
}
]
Expand Down Expand Up @@ -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',
}
],
Expand All @@ -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'
}
Expand Down Expand Up @@ -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',
}
],
Expand All @@ -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',
}
]
Expand Down Expand Up @@ -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
],
Expand Down Expand Up @@ -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
],
Expand Down

0 comments on commit ed641cf

Please sign in to comment.