Hellish-fast asynchronous HTTP client for NodeJS
📖 Documentation | ✨ Examples | 🖥️ Github |
---|
Node.js 8.0.0 or newer is required
npm install alastor
// Require using ES6 syntax
import Alastor from 'alastor';
// Or using old fancy style
const Alastor = require('alastor');
// async based implementation
(async () => {
try {
const res = await alastor('https://example.com');
console.log(res.body);
} catch (err) {
console.error(err);
}
})();
// .then based implementation
alastor('https://example.com')
.then((res) => {
console.log(res.body);
})
.catch((err) => {
console.error(err);
});
More examples can be found in the examples folder.
Alastor is designed to be as light-weight as possible but also have a programmatically powerful API.
| Package | Size |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------- |
| alastor | |
| node-fetch |
|
| axios |
|
| superagent |
|
| request |
|
Refer to the LICENSE file.
Generated using TypeDoc