@@ -4,7 +4,6 @@ import 'dart:convert';
4
4
import 'package:http/http.dart' ;
5
5
6
6
import '../noop_client.dart' ;
7
- import '../platform_checker.dart' ;
8
7
import '../protocol.dart' ;
9
8
import '../sentry_options.dart' ;
10
9
import 'noop_encode.dart' if (dart.library.io) 'encode.dart' ;
@@ -30,8 +29,8 @@ class HttpTransport implements Transport {
30
29
31
30
HttpTransport ._(this ._options)
32
31
: _dsn = Dsn .parse (_options.dsn! ),
33
- _headers =
34
- _buildHeaders ( _options.platformChecker, _options.sdk.identifier) {
32
+ _headers = _buildHeaders (
33
+ _options.platformChecker.isWeb , _options.sdk.identifier) {
35
34
_credentialBuilder = _CredentialBuilder (
36
35
_dsn,
37
36
_options.sdk.identifier,
@@ -139,12 +138,11 @@ class _CredentialBuilder {
139
138
}
140
139
}
141
140
142
- Map <String , String > _buildHeaders (
143
- PlatformChecker checker, String sdkIdentifier) {
141
+ Map <String , String > _buildHeaders (bool isWeb, String sdkIdentifier) {
144
142
final headers = {'Content-Type' : 'application/json' };
145
143
// NOTE(lejard_h) overriding user agent on VM and Flutter not sure why
146
144
// for web it use browser user agent
147
- if (! checker. isWeb) {
145
+ if (! isWeb) {
148
146
headers['User-Agent' ] = sdkIdentifier;
149
147
}
150
148
return headers;
0 commit comments