deleteAttachment method

Future deleteAttachment(
  1. String? docId,
  2. String? attachmentName,
  3. String? rev
)

Delete an attachment

Implementation

Future<dynamic> deleteAttachment(
    String? docId, String? attachmentName, String? rev) {
  if (docId == null) {
    return _raiseException(WiltException.deleteAttNoDocId);
  }

  if (attachmentName == null) {
    return _raiseException(WiltException.deleteAttNoName);
  }

  if (rev == null) {
    return _raiseException(WiltException.deleteAttNoRev);
  }

  var url = '$docId/$attachmentName?rev=$rev';

  url = _conditionUrl(url);
  return _httpRequest(deleteAttachmentt, url);
}