Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastagent

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastagent

Fast nodejs http/https client

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

fastagent

Node.js module for highload projects, written on typescript

Table of Contents

  • Install
  • Usage
  • Benchmarks
  • License

Install

npm:

npm install fastagent

yarn:

yarn add fastagent

Usage

import Client from "fastagent";
const client = new Client();

( () => {
    client.get({
        uri: "https://www.google.com",
        responseType: "text"
    }, console.log);
})();

Benchmarks

> node -r ts-node/register --max-old-space-size=4096 benchmark/index.ts

[core] http [GET] x 23,718 ops/sec ±6.20% (180 runs sampled)
[core] https [GET] x 21,763 ops/sec ±3.45% (180 runs sampled)
[fastagent] http empty response [GET] x 21,269 ops/sec ±1.48% (174 runs sampled)
[fastagent] https empty response [GET] x 19,905 ops/sec ±0.78% (179 runs sampled)
[fastagent] http empty response with url.parse [GET] x 14,545 ops/sec ±2.64% (173 runs sampled)
[fastagent] http binary response [GET] x 17,252 ops/sec ±1.26% (178 runs sampled)
[fastagent] https binary response [GET] x 16,766 ops/sec ±2.38% (174 runs sampled)
[superagent] http [GET] x 9,476 ops/sec ±5.54% (171 runs sampled)
[superagent] https [GET] x 9,998 ops/sec ±2.52% (175 runs sampled)
[request] http [GET] x 9,661 ops/sec ±1.85% (180 runs sampled)
[request] https [GET] x 8,907 ops/sec ±1.42% (179 runs sampled)
[axios] http [GET] x 7,725 ops/sec ±3.30% (173 runs sampled)
[axios] https [GET] x 7,551 ops/sec ±2.53% (169 runs sampled)
[got] http [GET] x 2,712 ops/sec ±3.42% (171 runs sampled)
[got] https [GET] x 2,851 ops/sec ±2.78% (173 runs sampled)
Benchmark done

License

MIT © Ibragim Zubailov

Keywords

FAQs

Package last updated on 24 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc