Skip to content

Commit 5cabf23

Browse files
authored
fix proxies encoding (#139)
1 parent 9c874b2 commit 5cabf23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/services/libproxydb_api.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class ProxyService {
2121
await http.get(Uri.parse('https://libproxy-db.org/proxies.json'));
2222

2323
if (response.statusCode == 200) {
24-
final List<dynamic> jsonList = json.decode(response.body);
24+
final decoded = utf8.decode(response.bodyBytes);
25+
final List<dynamic> jsonList = json.decode(decoded);
2526

2627
return jsonList.map((json) => ProxyData.fromJson(json)).toList();
2728
} else {

0 commit comments

Comments
 (0)