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

1.0.12 • Public • Published

A[rx]ios

Build Status Coverage Status

NPM

Observable based HTTP client on top of axios for browser and node.js

Installing

  • npm install arxios rxjs

Using

Can be created as an axios instance and used with same syntax and options, only returns Observables instead of Promises.

const arxios = new Arxios({
  baseURL: 'test.com',
  withCredentials: false,
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json',
  });
 
arxios.get('users', { params: { show_disabled: 'true' } }).subscribe((user) => {
  [...]
});

Also the internal axios instance is available.

const arxios = new Arxios();
arxios.axiosInstance.interceptors.request.use([...])

TypeScript

Arxios is coded entirely in TypeScript.

Building/Testing

  • npm install
  • npm run build
  • npm run lint
  • npm run test or npm run test:watch

Package Sidebar

Install

npm i arxios

Weekly Downloads

6

Version

1.0.12

License

LGPL-3.0-or-later

Unpacked Size

208 kB

Total Files

5

Last publish

Collaborators

  • karlos1337