Skip to content

mcoffin/http-shortcut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-shortcut

http-shortcut is a simple node.js library for small http requests.

Example

const { httpRequestF } = require('http-shortcut');

const requestOptions = {
    protocol: 'https:',
    hostname: 'api.example.com',
    port: 443,
    method: 'POST',
    path: `/v1/events`,
};

const evt = {
    foo: 'bar',
};

httpRequestF(requestOptions, JSON.stringify(evt))
    .then(res => res.checkResponse());

About

Simple node.js library for shortcutting small http requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published