Skip to main content

Downloads

Utility to download files from services

Version

Install

NPM

npm install @availity/dl-axios @availity/dl-core axios

Yarn

yarn add @availity/dl-axios @availity/dl-core axios

Usage

const downloadApi = new AvDownloadApi({
clientId: '1234',
});

dowloadApi.getAttachment().then((response) => {
const { data } = response;
downloadApi.downloadAttachment(data, 'filename.csv');
});

Methods

This class has the following methods to use.

getAttachment(config)

downloadAttachment(data, filename, mime)