@gibme/fetch

@gibme/fetch JS library on GitHub @gibme/fetch JS library on npm Download @gibme/fetch JS library

A simple wrapper that extends functionality around the fetch interface

Version 2.0.0 License MIT
@gibme/fetch has no homepage
@gibme/fetch JS library on GitHub
@gibme/fetch JS library on npm
Download @gibme/fetch JS library

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