Fixed wrong encodings

This commit is contained in:
Anton Stubenbord
2022-11-01 23:42:43 +01:00
parent b3cb64cad1
commit 2a1b90cc42
5 changed files with 31 additions and 21 deletions

View File

@@ -31,7 +31,7 @@ class AuthenticationService {
body: {"username": username, "password": password},
);
if (response.statusCode == 200) {
final data = jsonDecode(response.body);
final data = jsonDecode(utf8.decode(response.bodyBytes));
return data['token'];
} else if (response.statusCode == 400 &&
response.body.toLowerCase().contains("no required certificate was sent")) {