Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browsermob-proxy-api

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browsermob-proxy-api

NodeJS bindings for controlling a browsermob-proxy instance (creating ports, HARs, etc)

  • 0.3.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
increased by13.66%
Maintainers
1
Weekly downloads
 
Created
Source

Node BrowserMob Proxy API

This project provides a NodeJS interface for interacting with a running BrowserMob Proxy through it's REST API. All methods in the REST API are available including JavaScript-based interceptors for requests/responses.

Usage

Installation command is npm install browsermob-proxy-api

Documentation

For the specifics of the REST API used by BrowserMob Proxy, please see their documentation.

Examples

To open a port (10800) and start a new HAR:

var MobProxy = require('browsermob-proxy-api');
var proxy = new MobProxy({'host':'localhost', 'port': '8080'});

// start listening on port 10800:
proxy.startPort(10800, function(err, data) {
    // start new HAR report
    proxy.createHAR(10800, { 'initialPageRef': 'foo' });
});

To get the current HAR from a previously opened port:

proxy.getHAR(10800, function(err, data) {
    console.log(data);
});

Keywords

FAQs

Package last updated on 27 Mar 2017

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