post method
Convenience POST wrapper that parses JSON and checks status.
Implementation
Future<Map<String, dynamic>> post(String endpoint, dynamic body,
{bool auth = true}) async {
final r = await makeRequest(
'POST',
Uri.parse('$apiUrl$endpoint'),
body: json.encode(body),
useAuth: auth,
);
final d = json.decode(utf8.decode(r.bodyBytes, allowMalformed: true));
if (d['status'] != true) throw Exception(d['message']);
return d;
}