deleteExistingApp method

Future<MdmEmpty> deleteExistingApp(
  1. String apiKey, {
  2. required String appId,
})

Implementation

Future<MdmEmpty> deleteExistingApp(
  String apiKey, {
  required String appId,
}) async {
  final String url = '$channel/api/v1/mdm/apps/$appId';

  final response = await http.delete(
    Uri.parse(url),
    headers: {
      'Authorization': 'Zoho-oauthtoken $apiKey',
      'Content-Type': 'application/json;charset=UTF-8',
    },
  );

  if (!response.statusCode.isSuccessful) {
    throw MdmEngineException(
      method: response.request?.method,
      url: url,
      statusCode: response.statusCode,
      error: response.body,
    );
  }

  return MdmEmpty();
}