diff --git a/filcnaplo/lib/api/client.dart b/filcnaplo/lib/api/client.dart index ba7ccad..459c3b8 100644 --- a/filcnaplo/lib/api/client.dart +++ b/filcnaplo/lib/api/client.dart @@ -190,12 +190,22 @@ class FilcAPI { static Future sendReport(ErrorReport report) async { try { - http.Response res = await http.post(Uri.parse(reportApi), body: { + Map body = { "os": report.os, "version": report.version, "error": report.error, "stack_trace": report.stack, - }); + }; + + var client = http.Client(); + + http.Response res = await client.post( + Uri.parse(reportApi), + body: body, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + ); if (res.statusCode != 200) { throw "HTTP ${res.statusCode}: ${res.body}";