deleteJob method

Future<void> deleteJob(
  1. String host,
  2. String jobId
)

Deletes a scan job based on the provided job ID.

host - The host server URL. jobId - The ID of the job to delete.

Implementation

Future<void> deleteJob(String host, String jobId) async {
  if (jobId.isEmpty) return;
  final url = '$host/DWTAPI/ScanJobs/$jobId';

  try {
    final response = await http.delete(Uri.parse(url));
    if (response.statusCode == 200) {}
  } catch (error) {}
}