
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@themarkup/puppeteer-har
Advanced tools
Generate HAR file with puppeteer.
npm install @the-markup/puppeteer-har
import puppeteer from "puppeteer"
import { captureNetwork } from "puppeteer-har"
const browser = await puppeteer.launch()
const page = await browser.newPage()
const getHar = await captureNetwork(page)
await page.goto("http://example.com")
const har = await getHar()
await browser.close()
captureNetwork(page[, options])Start capturing the network traffic of the given puppeteer page.
saveResponsesDefaults to false.
If set the HAR file will also include the responses to network requests.
captureMimeTypesDefaults to ['text/html', 'application/json'].
When responses should be saved you can specify which response types to include through this array.
captureNetwork returns a method that will stop capturing traffic and return a HAR file when called.
getHar()fileName (optional) - A string that is used as a filename for the generated HAR file. If provided, the HAR file will be saved to this location.
If not passed in, the function will directly return the HAR JSON.
FAQs
Generate HAR file with Puppeteer
The npm package @themarkup/puppeteer-har receives a total of 96 weekly downloads. As such, @themarkup/puppeteer-har popularity was classified as not popular.
We found that @themarkup/puppeteer-har demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.