Skip to content

v0.8.0-alpha.0

Pre-release
Pre-release

Choose a tag to compare

@suhaotian suhaotian released this 11 Nov 08:37
· 22 commits to main since this release

What's Changed

  • feat: add xior/stream plugin, built it into package.json's node exports entry, now {responseType: 'stream'} is same behaviour with axios in nodejs; Fix #46
  • Feat: support xior(requestObj) syntax, Fix #45
  • Feat: add isCancel util, re-export merge as mergeConfig util
  • Feat: re-export Xior* as Axios*, now you can import {AxiosResponse, AxiosRequestConfig} from 'xior'
  • ci: skip ci tests when only markdown files are edited by @kitsiosk in #44
  • Chore: minor code and doc improvement

Breaking change:

  • if you use {responseType: 'stream'} in Node.js, follow the issue #46 . Others platform keep the original behaviour.

In Bun or node:

import axios from 'xior';

axios
  .request({
    method: 'get',
    url: 'https://bit.ly/2mTM3nY',
    responseType: 'stream',
  })
  .then(function (response) {
    response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'));
  });

How to install

This is pre-release, so:

npm i xior@next

New Contributors

Full Changelog: v0.7.8...v0.8.0-alpha.0