@popcornjs/http
v2.4.0
Published
Fast & efficient promise based module for making request to the popcorn API
Downloads
13
Readme
@popcornjs/http
A wrapper for the popcorn🍿 API.
Features:
- Written in TypeScript
- Built in Typings
- Promise based
- Only 1 dependency
- Super small
- Easy to use
Example use:
import * as popcorn from '@popcornjs/http';
// Because top level await doesnt exist :(
(async () => {
// POST reqest
const post = await popcorn.post({ eatMore: boolean, key: string, user: string });
// GET reqest
const get = await popcorn.get();
console.log(post, get);
// get returns stats
})();