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

1.0.0 • Public • Published

@fetch-impl/puppeteer

User Configurable Fetch Implementation. Puppeteer adapter, supports fetch in real browser.

Usage

import puppeteer from "puppeteer";
import { usePuppeteer } from "@fetch-impl/puppeteer";
import fetch from "@fetch-impl/fetcher";

// configure fetch to use puppeteer
usePuppeteer(puppeteer.launch());

// use fetch as usual
fetch("https://example.com").then(async (res) => {
    console.log(res.status, await res.text());
});

Note: The browser will not be closed automatically. You should close it manually when you are done with it.

Dependents (0)

Package Sidebar

Install

npm i @fetch-impl/puppeteer

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

8.83 kB

Total Files

7

Last publish

Collaborators

  • jacoblincool