I recently discovered that I cannot read the response body of an ajax request with PhantomJS. Looking into this issue, it appears this has been kicked around for quite some time with no complete resolution. I'm wondering if this capability is not wanted by the PhantomJS project for some reason, possibly resource related.
There are lots of old issues and even an old PR to address this, but it is unclear if this is progressing, stalled, not wanted by the project maintainers, etc... Issue: https://github.com/ariya/phantomjs/issues/10158 PR: https://github.com/ariya/phantomjs/pull/11484
Does anyone know the status of this capability in the PhantomJS project?
I had this same question, and I discovered that this feature has recently been added to the master branch:
https://github.com/ariya/phantomjs/commit/434d4e0101a540525e8f89a657ea553fb38b040b
As of this writing, you'll need to compile from source (skip the git checkout 2.0
step), as this change hasn't made it into the precompiled binaries.
Note that it'll only capture the body when explicitly requested to do so in the page.captureContent
array. For example:
page.captureContent = ['/interestingpage', '/veryinterestingpage'];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With