jossef / jossef/requests

Requests not Working on 4g

Open
#96 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
143
Forks
52
PR merge metrics
No merged PRs in 30d

Description

My flutter app is working good on all android versions except greater than 10 while using mobile data, I checked it on Samsung A71 having android 13 and it worked on both wifi and 4g but the same apk is not working on other mobiles like pocco/oppo having android version greater than 10, I am using http in my url.
**Here is my code**
` Future requestDataFromNetwork(
{String urlFile, dynamic body, BuildContext context}) async {
var response;
var baseURL = '${Globals.baseUrl}/$urlFile';
try {
response = await Requests.post(baseURL,
body: body, timeoutSeconds: 30, persistCookies: true);
return response.body.toString();
} catch (e) {
return response = '';
}
}`
This is my dependency: **requests: ^4.7.0**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.