axios-stream
TypeScript icon, indicating that this package has built-in type declarations

1.0.17 • Public • Published

AxiosStream

Download stream files via axios

Logo

This library is only suitable for WEB projects that use axios as the HTTP request library

Please install axios first, and then use axios-stream

The problems it solves:

Using Axios and Blob objects to achieve file stream download

How to use:

1. Installation

npm install axios-stream or yarn add axios-stream

2. Reference

import AxiosStream from "axios-stream";

3. Call the method

 
const downFileName='today'
const extensionName='xlsx'
const axiosConfig={
  method: 'get',
  url: '/user/12345',
}
 
AxiosStream.download(downFileName, extensionName, axiosConfig);

Enter the path and file name you want to download

the file name must include the extension**

Thanks

This method originated from the Internet and was inspired by chennvwang

Readme

Keywords

Package Sidebar

Install

npm i axios-stream

Weekly Downloads

40

Version

1.0.17

License

GPL-3.0

Unpacked Size

40.2 kB

Total Files

8

Last publish

Collaborators

  • joynop