npm.io
10.0.0 • Published 2d ago

@toruslabs/http-helpers

Licence
MIT
Version
10.0.0
Deps
2
Size
63 kB
Vulns
0
Weekly
0
Stars
4

Http helpers

npm version npm

Introduction

  • This package allows you to call http methods with pre defined configs. Uses fetch or node-fetch internally
  • Adds support for api keys
  • Works in both browser and node.js environments

Installation

Bundling

This module is distributed in two formats:

  • lib.esm at dist/lib.esm/index.js
  • lib.cjs at dist/lib.cjs/index.js

Both builds import loglevel. They are not standalone browser scripts, so a <script> tag on the jsDelivr or unpkg URL will not run the package. Use a bundler, or Node import / require.

Usage

Add @toruslabs/http-helpers to your project:

import { get, post } from "@toruslabs/http-helpers";
const { get, post } = require("@toruslabs/http-helpers");

Requirements

  • Node 24.22 or newer

Keywords