doPOST method
Implementation
Future doPOST(String url, dynamic body, {Map<String, String>? headers}) async {
headers = _headers(headers);
url = _url(url);
var res = await post(url, jsonEncode(body), headers: headers);
if (res.statusCode == 401) {
if (await _refreshToken()) {
headers = _headers(headers);
res = await post(url, jsonEncode(body), headers: headers);
}
}
return _checkResponse(res);
}