Hello,
I have put the json file on my shared hosting and when I try to run your example by changing the baseURL with the complete path of the json online, I receive the error on title but the "response.body" print correctly the json.
Why?
final baseUrl = "https://api.buuumit.com/d.json";
Future<List<dynamic>> fetchElements() async {
try {
final response = await get(Uri.parse(baseUrl));
print(jsonDecode(response.body));
return jsonDecode(response.body) as List;
} catch (e) {
print(e);
return [];
}
}
thx