-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Script:
var Proxy = require('browsermob-proxy').Proxy
, proxy = new Proxy()
, fs = require('fs');
console.log(' app running');
proxy.doHAR('http://yahoo.com', function(err, data) {
console.log('callback running');
if (err) {
console.error('ERROR: ' + err);
} else {
console.log('happy', data);
fs.writeFileSync('yahoo.com.har', data, 'utf8');
}
}); Output:
$ node index.js
app running
$
browsermob-proxy v2.1.4 is running and logs output when the script runs
[INFO 2017-02-22T11:27:48,264 org.littleshoot.proxy.impl.DefaultHttpProxyServer] (qtp26890590-15) Starting proxy at address: 0.0.0.0/0.0.0.0:8086
[INFO 2017-02-22T11:27:48,265 org.littleshoot.proxy.impl.DefaultHttpProxyServer] (qtp26890590-15) Proxy listening with TCP transport
[INFO 2017-02-22T11:27:48,266 org.littleshoot.proxy.impl.DefaultHttpProxyServer] (qtp26890590-15) Proxy started at address: /0:0:0:0:0:0:0:0:8086
Metadata
Metadata
Assignees
Labels
No labels