axios-stream (v1.0.17) is a lightweight, browser-only library that wraps axios to download files as streams using Blob objects. It simplifies the process of triggering file downloads via an HTTP request made with axios, automatically creating a download link and clicking it. The package is intended solely for web projects and requires axios as a peer dependency (install separately). Its main differentiator is simplicity: a single static method `download` that takes a filename, extension, and axios config. The library is rarely updated (last release dates not specified, but low activity). Compared to alternatives like `file-saver`, it tightly integrates with axios configs.
npm install axios-streamNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This code demonstrates downloading a file stream via axios using axios-stream library. It sets a filename, extension, and axios configuration, then triggers the download.
Only use in browser applications or configure a Blob polyfill in Node.
Always pass the extension as the second argument, e.g., 'xlsx'.
N/A
Run 'npm install axios' and ensure import statement is correct: import AxiosStream from 'axios-stream';
In axiosConfig, set responseType: 'blob'
Use import AxiosStream from 'axios-stream'; or const { default: AxiosStream } = require('axios-stream');