deleteDocument method
Delete a document.
host - The host server URL.
docId - The ID of the document.
Returns a bool indicating whether the document was deleted successfully.
Implementation
Future<bool> deleteDocument(String host, String docId) async {
final url = '$host/api/storage/documents/$docId';
try {
final response = await http.delete(Uri.parse(url));
return response.statusCode == 204;
} catch (error) {
return false;
}
}