Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

aidenybai/alastor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

This was originally a TypeScript port with extra features of centra. Please do not use this package, use centra for a maintained version.

Alastor

Hellish-fast asynchronous HTTP client for NodeJS

๐Ÿ“– Documentation โœจ Examples ๐Ÿ–ฅ๏ธ Github

Features

  • ~12kb size (smaller than the competition)
  • Uses TypeScript that provides hints in editor, type checking, etc.
  • Asynchronous, allowing both .then chaining and async/await
  • No dependencies
  • Class abstraction

Installing

Node.js 8.0.0 or newer is required

npm install alastor

Simple Example

// 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.

Size Comparisons

Alastor is designed to be as light-weight as possible but also have a programmatically powerful API.

Package Size
alastor alastor package size
node-fetch node-fetch package size
axios axios package size
superagent superagent package size
request request package size

License

Refer to the LICENSE file.

About

๐Ÿ˜ˆ๐Ÿค˜ Hellish-fast asynchronous HTTP client for NodeJS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published