I read a text file content from an URL and it is working perfectly like below:
response = await http.get('http://example.com/complex.txt'));
if (response.statusCode == 200) {
complex = (convert.json.decode(response.body)['data'] as List)
.map((e) => Complexes.fromJson(e))
.toList();
for (var i in complex) {
complexes.add(i);
}
}
But when I change text file content, body of response does not change and show old content.
Questions:
Is text caching in host or application?
How can I disable this caching?
I solved my problem with fake parameter like below :
response = await http.get('http://example.com/complex.txt?parameter=1'));
I do not think it is the best solution but it is solved my problem.