@joe-sh/pnpm-api-adapters

0.0.5 • Public • Published

Example API Adapters Package

This package provides sample api adapters for the JSONPlaceholder website that work with two different http libraries: axios and node-fetch.

Installation

pnpm i @joe-sh/pnpm-api-adapters

axios Usage

When using the axios adapters, you must also install axios.

pnpm i axios
const adapter = require('@joe-sh/pnpm-api-adapters/main.axios.js');
adapter('todos/1').then((resp) => console.log(resp));

node-fetch Usage

When using the node-fetch adapters, you must also install node-fetch.

pnpm i node-fetch
const adapter = require('@joe-sh/pnpm-api-adapters/main.fetch.js');
adapter('todos/1').then((resp) => console.log(resp));

Readme

Keywords

none

Package Sidebar

Install

npm i @joe-sh/pnpm-api-adapters

Weekly Downloads

1

Version

0.0.5

License

none

Unpacked Size

3.14 kB

Total Files

7

Last publish

Collaborators

  • josephschmitt