meditohq/medito-app

Add custom header information to all requests

scouech opened this issue · 1 comments

Right now we are doing an "appOpened" event with the following information

{ "name": "appOpened", "payload": { "deviceOs": "iOS", "deviceLanguage": "en-US", "deviceModel": "iPhone 12 Pro Max", "appVersion": "2.1.3" } }

To make easier to debug on the backend, we need to pass that data in the header of every requests to the backend (POST, GET, DELETE, or whatever other call we are making).

The information should be in the header formatted like this:

'Device-Os': '{iOS or Android}',
'Device-Language': '{in the format like en-US}',
'Device-Model': '{the model such as iPhone 12 Pro Max}',
'App-Version': '{the app version}'

We should also add the device time as
'Device-Time': '{the device time }'
More info here:
https://api.flutter.dev/flutter/dart-core/DateTime-class.html