@gibme/fetch
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

cross-fetch wrapper

  • Supports timeout option
  • Supports the use of CookieJars via cookieJar option
    • Pass in a cookie jar and have your cookies persistent between calls

Sample Code

import fetch from '@gibme/fetch';

(async () => {
    console.log(await fetch('https://google.com', { timeout: 5000 }));
    
    console.log(await fetch.get('https://google.com'));
})();

Using a CookieJar

import fetch, {CookieJar } from "@gibme/fetch";

(async () => {
    const cookieJar = new CookeJar();
    
    console.log(await fetch('https://google.com', { cookieJar }));
    console.log(cookieJar);
})();

Readme

Keywords

none

Package Sidebar

Install

npm i @gibme/fetch

Weekly Downloads

42

Version

1.0.6

License

MIT

Unpacked Size

14 kB

Total Files

5

Last publish

Collaborators

  • brandonlehmann