1.0.6 • Published 3 months ago

@gibme/fetch v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

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