downloadAttachment method

Future<Uri> downloadAttachment({
  1. required String id,
  2. required String attachmentId,
  3. int? version,
})

Redirects the client to a URL that serves an attachment's binary data.

Implementation

Future<Uri> downloadAttachment(
    {required String id, required String attachmentId, int? version}) async {
  return await _client.send(
    'get',
    'wiki/rest/api/content/{id}/child/attachment/{attachmentId}/download',
    pathParameters: {
      'id': id,
      'attachmentId': attachmentId,
    },
    queryParameters: {
      if (version != null) 'version': '$version',
    },
    followRedirects: false,
  );
}