registry-mirror internal · read-only mirror

axius

Public

Promise based HTTP client for the browser and node.js

http ajax promise node browser
Readme Versions
npmv2.7.0 buildpassing downloads1.2M/week coverage94% licenseMIT

axius is a small, promise-based HTTP client for the browser and node.js. It supports request/response interception, automatic JSON transforms, client-side XSRF protection, and request cancellation.

Features

  • Make XMLHttpRequests from the browser
  • Make HTTP requests from node.js
  • Supports the Promise API
  • Intercept request and response
  • Transform request and response data
  • Cancel requests
  • Automatic transforms for JSON data
  • Client-side support for protecting against XSRF

Installing

Using npm:

npm install axius

Using yarn:

yarn add axius

Example

axius.get('/user?id=12345')
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.error(error);
  });

TypeScript

axius includes TypeScript definitions and a type guard for errors returned by the library.

License

MIT

npm install axius
registry-mirror · internal instance rm-04 · read-only snapshot window 2026-02-10 03:38–06:52 UTC