phantomjs network monitoring response body undefined always

Created on 22 Sep 2016  路  6Comments  路  Source: ariya/phantomjs

1. Which version of PhantomJS are you using? Tip: run phantomjs --version.

2.1.1

2. What steps will reproduce the problem?

1. monitoring network of website

3. Which operating system are you using?

mac el capitan && windows 10

4. Did you use binary PhantomJS or did you compile it from source?

binary


i use this code

var url = "http://google.com"
var page = require('webpage').create();
page.onResourceReceived = function(response) {
console.log('Receive ' + response.body);
};
page.open(url);

and its always response undefiend

stale

Most helpful comment

@thoop how can i get then the data

All 6 comments

onResourceReceived does not contain the body in the response:

http://phantomjs.org/api/webpage/handler/on-resource-received.html

@thoop how can i get then the data

sadly to see it's empty in response body in onResourceReceived and couldn't change it

this issue has been raised in 2011 https://github.com/ariya/phantomjs/issues/10158 and as the related feature has never worked, I am guessing it never will.

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

Was this page helpful?
0 / 5 - 0 ratings