Sha256: fee4d999915afd6b389152aa379c7b77a0971fea7176042134d22f3fb0471c2a
Contents?: true
Size: 552 Bytes
Versions: 2
Compression:
Stored size: 552 Bytes
Contents
page = require('webpage').create() system = require 'system' if system.args.length is 1 console.log 'Usage: netlog.coffee <some URL>' phantom.exit() else address = system.args[1] page.onResourceRequested = (req) -> console.log 'requested ' + JSON.stringify(req, undefined, 4) page.onResourceReceived = (res) -> console.log 'received ' + JSON.stringify(res, undefined, 4) page.open address, (status) -> if status isnt 'success' console.log 'FAIL to load the address' phantom.exit()
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
phantomjs.rb-0.0.2 | vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/netlog.coffee |
phantomjs.rb-0.0.1 | vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/netlog.coffee |