getAttachment method

Future getAttachment(
  1. String? docId,
  2. String? attachmentName
)

Get an attachment

Implementation

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

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

  var url = '$docId/$attachmentName';

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