post static method

Future post(
  1. String url, {
  2. dynamic body,
  3. Map<String, String>? headers,
  4. bool debug = false,
})

Implementation

static Future<dynamic> post(String url,
    {dynamic body, Map<String, String>? headers, bool debug = false}) async {
  var reqHeaders = await getHeaders(customHeaders: headers);
  if (debug) {
    logger.d('Request headers: $reqHeaders');
  }
  var response =
      await http.post(Uri.parse(url), headers: reqHeaders, body: body);
  return handleResponse(response);
}