Fixed issue on post requests

This commit is contained in:
Juan Gilsanz Polo 2022-10-02 05:42:40 +02:00
parent 97a25fb8e9
commit 441dad441d
5 changed files with 24 additions and 7 deletions

View file

@ -36,7 +36,7 @@ Future<http.Response> postRequest({
headers: {
'Authorization': 'Basic ${server.authToken}'
},
body: body ?? stringBody
body: (body != null ? jsonEncode(body) : null) ?? stringBody
).timeout(const Duration(seconds: 10));
}