@popcornjs/http

Fast & efficient promise based module for making request to the popcorn API

Usage no npm install needed!

<script type="module">
  import popcornjsHttp from 'https://cdn.skypack.dev/@popcornjs/http';
</script>

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
})();