Socket
Socket
Sign inDemoInstall

reqlib

Package Overview
Dependencies
3
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    reqlib

A library to simplify REST API requests and to provide utilities for handling common REST API consumer scenarios


Version published
Weekly downloads
474
decreased by-18.42%
Maintainers
1
Install size
2.49 MB
Created
Weekly downloads
 

Readme

Source

Simple Request Library

Build Status Coverage Status

Request

new Request(options)

import { Request } from 'reqlib';

const
  options = {
    maxRedirectCount : 5, // # of redirects to follow
    maxRetryCount : 3, // # of times to retry in the event of a 5xx
    timeout : 1000 // milliseconds
  },
  req = new Request(options);

(async () => {
  try {
    let result = await req.get('https://test.api.io/v1/tests');
    console.log(result);
  } catch (ex) {
    console.error(ex);
  }
})();

delete

get

head

patch

post

put

Resource

Keywords

FAQs

Last updated on 14 Feb 2019

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc