Skip to content
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

fix: 937 - removed home-made user agent header when for web #950

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Our home-made user agent prevents our dart package to work when used in web mode.
  • We use this specific user agent for stats.
  • The solution implemented here removes the user agent http header when in web mode, so that the package can be used.
  • Possible improvements would be to change the way we build our user agent string (but that would have an impact on our previous/next stats), or where we put that home-made string (e.g. different http header tag) (but that would have an impact on our stats consistency too)
  • We'll see how many requests we get from web mode. Later we can select one of the suggested improvements, or something else.

Fixes bug(s)

Impacted files

  • api_add_product_image_test.dart: minor refactoring
  • http_helper.dart: removed home-made user agent header when for web; minor refactoring
  • open_prices_api_client.dart: minor refactoring
  • uri_reader.dart: added an isWeb getter; minor refactoring
  • uri_reader_js.dart: implemented the isWeb getter

Impacted files:
* `api_add_product_image_test.dart`: minor refactoring
* `http_helper.dart`: removed home-made user agent header when for web; minor refactoring
* `open_prices_api_client.dart`: minor refactoring
* `uri_reader.dart`: added an `isWeb` getter; minor refactoring
* `uri_reader_js.dart`: implemented the `isWeb` getter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Flutter Web and the User Agent
1 participant