-
-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add standard client headers #1130
base: main
Are you sure you want to change the base?
feat: Add standard client headers #1130
Conversation
Pull Request Test Coverage Report for Build 14311896796Details
💛 - Coveralls |
|
||
class Constants { | ||
static const Map<String, String> defaultHeaders = { | ||
static String get platform { | ||
return Platform.operatingSystem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is still draft, but still want to mention that this won't work on web.
You will either need a conditional import, or probably better use a constant to guard web with a definition like the kIsWeb
in flutter:
const bool kIsWeb = bool.fromEnvironment('dart.library.js_util');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Vinzent03
Do we have any test for asserting that it doesn't break in Web? Didn't see any fail on CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly not yet, but hopefully #1140 solves this
…andard-client-headers-on-all
What kind of change does this PR introduce?
Bug fix, feature, docs update, ...
What is the current behavior?
Please link any relevant issues here.
What is the new behavior?
Feel free to include screenshots if it includes visual changes.
Additional context
Add any other context or screenshots.