@gibme/fetch
v1.0.14
Published
A simple wrapper that extends functionality around the fetch interface
Downloads
87
Readme
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);
})();