You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i try to GET request to rest api with HttpClient, http or dio and always get FormatException when try to decode the response only if using emulator and if data is big, like 5 mb json data or thousand of row, i try in real device and didn't experience any problems.
here example from Exception result, there comma and quotes missing in in several position and always change every request even is same endpoint and same data
first request
second request
third request
i also try to log the string response and try to validate with jsonlint and there always missing comma or quotes
package version :
http: ^1.2.0
dio: ^5.4.3+1
flutter doctor :
[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [Version 10.0.22631.3447], locale en-ID)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.0)
[√] Android Studio (version 2022.2)
[√] Android Studio (version 2023.3)
[√] VS Code (version 1.89.1)
[√] Connected device (4 available)
[√] Network resources
my code :
var url =Uri.parse(baseUrl +'/asset');
var response =await http.get(url);
dynamic responseData =jsonDecode(response.body.toString());
The text was updated successfully, but these errors were encountered:
i try to GET request to rest api with HttpClient, http or dio and always get
FormatException
when try to decode the response only if using emulator and if data is big, like 5 mb json data or thousand of row, i try in real device and didn't experience any problems.here example from Exception result, there comma and quotes missing in in several position and always change every request even is same endpoint and same data
first request
second request
third request
i also try to log the string response and try to validate with jsonlint and there always missing comma or quotes
package version :
http: ^1.2.0
dio: ^5.4.3+1
flutter doctor :
[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [Version 10.0.22631.3447], locale en-ID)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.0)
[√] Android Studio (version 2022.2)
[√] Android Studio (version 2023.3)
[√] VS Code (version 1.89.1)
[√] Connected device (4 available)
[√] Network resources
my code :
The text was updated successfully, but these errors were encountered: