client-cache-fetch
TypeScript icon, indicating that this package has built-in type declarations

2.4.2 • Public • Published

Client Cache Fetch

Helper for fetching and caching text responses using localStorage.

Installation

npm install client-cache-fetch

Syntax

Client cache fetch inherits the same API as fetch().

cacheFetchResponsePromise = cacheFetch(resource, init);

Example

import cacheFetch from "client-cache-fetch";

const reponse = await cacheFetch("https://api.ipdata.co/?api-key=test", {
  method: "GET",
  headers: {
    "Content-Type": "text/json",
  },
});

Readme

Keywords

Package Sidebar

Install

npm i client-cache-fetch

Weekly Downloads

0

Version

2.4.2

License

ISC

Unpacked Size

5.7 kB

Total Files

8

Last publish

Collaborators

  • igneosaur