These are chat archives for rosshinkley/nightmare

2nd
Sep 2016
Rob Brackett
@Mr0grog
Sep 02 2016 22:06
@benjick if you just want to know the details of what loaded and not prevent things from loading (or redirect them or otherwise affect how they are loaded) you can just use the did-get-response-details event:
Nightmare()
  .on('did-get-response-details', function (event, socketStatus, url, originalUrl, code, method, referrer, headers, type) {
    console.log('Response:');
    console.log('  url:', url);
    console.log('  originalUrl:', originalUrl);
    console.log('  code:', code);
    console.log('  method:', method);
    console.log('  referrer:', referrer);
    console.log('  type:', type);
  })
  .goto('http://vox.com')
  .end()
  .then();
For the page itself, the type argument will be "mainFrame", so you know to ignore that one
Ross Hinkley
@rosshinkley
Sep 02 2016 22:09
ah right
forgot about response details
derp
Ross Hinkley
@rosshinkley
Sep 02 2016 22:16
price i pay for not actually looking at the docs... thanks @Mr0grog :)