browsermob-proxy-api-client
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

BrowserMob Proxy API Client

Client library for BrowserMob Proxy API

Refer to REST API section of BrowserMob Proxy documentation for detailed information

npm install size npm bundle size npm downloads Known Vulnerabilities Coverage

Installing

Using npm:

$ npm install browsermob-proxy-api-client

Using yarn:

$ yarn add browsermob-proxy-api-client

Example

import BrowserMobProxyAPIClient from 'browsermob-proxy-api-client';

const proxy = new BrowserMobProxyAPIClient('localhost', '8080');
const port = await proxy.start();
if (port) {
  try {
    await proxy.startHar(port);
    // exec `curl google.com --proxy localhost:${port}`
    const har = await proxy.getHar(port);
  } catch (e) {
    console.error(e);
  } finally {
    await proxy.stop(port);
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i browsermob-proxy-api-client

Weekly Downloads

8

Version

2.0.0

License

MIT

Unpacked Size

30 kB

Total Files

8

Last publish

Collaborators

  • raul72