Socket
Socket
Sign inDemoInstall

@agile-ts/api

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agile-ts/api

Promise based HTTP request API for Node.js


Version published
Weekly downloads
20
decreased by-77.53%
Maintainers
1
Weekly downloads
 
Created
Source

[WIP] API

Promise based HTTP request API for Node.js

Status npm version GitHub License npm monthly downloads npm total downloads npm minified size

⏰ Short Example

// Let't create our API
const api = new API({
  baseURL: 'https://myapp.com', // Base Route to the Host
  timeout: 10000, // After which amount of time a request times out
  options: { credentials: 'include' } // Http/s Request Options from type RequestInit
});

// Now we can create our first Request to 'https://myapp.com/hello'
const response = await api.get('/hello');
console.log(response);
/* 
  {
      data: {hello: "Jeff"}; // Response Data
      timedout: false; // If Request has timedout
      status: 200; // Response Status Code
      raw: Response; // Raw Response from type Response
      type: "application/json"; // Response Type
  }
*/

❓ Why Agile Api

🚅 Straightforward

Write minimalistic, boilerplate free code that captures your intent.
For instance

  • Automatic transform for JSON data
  • Configurable Timeout
🎯 Easy to Use

Learn the powerful and simple tools of Agile Api in a short amount of time.

🍃 Lightweight

Agile Api has an unpacked size of 2kB and 0 external dependencies.

⬇️ Installation

npm install @agile-ts/api

The api package is an extension of AgileTs and doesn't work without the core package, which functions as the brain of AgileTs and is indispensable. Unfortunately, we can't combine each core with api version. Therefore, we have created a table which shows which versions fit together without restrictions.

@agile-ts/api@agile-ts/coreNPM Version
v0.0.7+v0.0.7+v6+
v0.0.6v0.0.3 - v0.0.6v6+
Other Versions aren't supported anymore

📄 Documentation

The Agile Api Docs are located here

Keywords

FAQs

Package last updated on 04 Sep 2022

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