Promise based HTTP client for the browser and node.js
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.
Using npm:
npm install axius
Using yarn:
yarn add axius
axius.get('/user?id=12345')
.then(function (response) {
console.log(response.data);
})
.catch(function (error) {
console.error(error);
});
axius includes TypeScript definitions and a type guard for errors returned by the library.
MIT