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 - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

index.js

@@ -128,3 +128,3 @@ var http = require('http');

if(self.debug) { console.log(resp); }
if(callback != undefined) { callback(resp); }
if(callback != undefined) { callback(null, resp); }
});

@@ -131,0 +131,0 @@ }

{
"name": "browsermob-proxy-api",
"version": "0.1.1",
"version": "0.1.2",
"description": "NodeJS bindings for controlling a browsermob-proxy instance (creating ports, HARs, etc)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -13,1 +13,20 @@ # Node BrowserMob Proxy API

### Examples
To open a port (10800) and start a new HAR:
```javascript
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:
```javascript
proxy.getHAR(10800, function(err, data) {
console.log(data);
});
```
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