doPost function

dynamic doPost(
  1. String urlAfterBase,
  2. Map bod, {
  3. Map<String, String>? headers,
})

Implementation

doPost(String urlAfterBase, Map bod, {Map<String, String>? headers}) async {
  var body = stripNulls(bod);
  var uri = Uri.https(base, '/auto/api/$urlAfterBase');
  var js = await http.post(uri, body: jsonEncode(body), headers: headers);
  var decoded = jsonDecode(js.body);
  return decoded;
}