Skip to content

Zero-dependency utility for making http requests in nodejs and returning ES6 promises

Notifications You must be signed in to change notification settings

peckinc/request-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

request-lite

Zero-dependency utility for making http requests and returning ES6 promises

  • Written in Typescript
  • Zero dependencies
  • Returns an ES6 Promise

Usage

Usage is loosly modeled after the excellent request package, but with fewer features in exchange for zero dependencies.

import request from '@peck/request-lite'

let options = {
    url: 'http://google.com',
    method: 'GET',
}
request(options).then((response) => {
    console.log('success: ',response);
}).catch((error) => {
    console.error('This should not have failed! ', error);
});

About

Zero-dependency utility for making http requests in nodejs and returning ES6 promises

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published