postDataWithData method

dynamic postDataWithData({
  1. dynamic apiUrl,
  2. dynamic data,
  3. String? fName,
})

Implementation

postDataWithData({apiUrl, data, String? fName}) async {
  logCat('URL: [POST]: $fName .::. $apiUrl');
  var response = await http.post(Uri.parse(apiUrl),
      body: jsonEncode(data), headers: _setHeaders());
  logCat(
      'URL: [POST]: $fName .::. $apiUrl :: statusCode: ${response.statusCode}');
  return response;
}