post static method
Sends an HTTP POST request.
Implementation
static Future<Map<String, dynamic>> post(
{required String method, bool isAuth = false, bool testMode = false, required Map<String, dynamic> body}) async {
if (ApiST.instance.baseUrl == null) {
throw EticonApiError(error: 'Base url not set, use Api.init()');
}
if (isAuth) {
if (Token.instance.token.isEmpty) {
throw EticonApiError(error: 'Authentication token is empty, use Api.setToken (String url)');
}
}
return await ApiST.instance
.request(type: TYPE.POST, method: method, isAuth: isAuth, testMode: testMode, query: body);
}