New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@testim/chrome-har

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testim/chrome-har

Create HAR files from Chrome Debugging Protocol data.

  • 0.11.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
68
decreased by-6.85%
Maintainers
1
Weekly downloads
 
Created
Source

Chrome-har

Build status

Create HAR files based on Chrome DevTools Protocol data.

Code originally extracted from Browsertime, initial implementation inspired by Chromedriver_har.

Support for Response Bodies

Chrome-har optionally supports response bodies in HARs if they are set on the response object by the caller and if the includeTextFromResponseBody option is set to true.

For example:

const harEvents: Array<any> = [];

client.on('Network.requestIntercepted', async (params: any) => {
  // Get the response body
  const response = await client.send(
    'Network.getResponseBodyForInterception',
    { interceptionId: params.interceptionId },
  );

  // Set the body on the response object
  if (params.response != null) {
    params.response.body = response.body;
  } else {
    params.response = response;
  }

  // Continue the request
  await client.send(
    'Network.continueInterceptedRequest',
    { interceptionId: params.interceptionId },
  );

  harEvents.push({ method, params });
});

const har = harFromMessages(harEvents, {includeTextFromResponseBody: true});

Keywords

FAQs

Package last updated on 14 Oct 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc