2.0.0 • Published 6 months ago
@gibme/fetch v2.0.0
cross-fetch wrapper
- Supports
timeoutoption - Supports the use of CookieJars via
cookieJaroption- 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);
})();