Simon
Simon

Reputation: 21

CasperJS sendAjax return null

of the code on CasperJS

var data = this.evaluate(function(url) {
     return JSON.parse(__utils__.sendAJAX(url, 'GET', null, false));
}, {url: url});

this.then(function() {
     require('utils').dump(data);
});

by url

<?php
echo 'zzz';
exit;

To the url request comes in, I checked. However, data shows

array(1) { [0]=> string(4) "null" }

Somebody tell me what's wrong?

Upvotes: 1

Views: 280

Answers (1)

Simon
Simon

Reputation: 21

Add option --web-security=no

exec('/usr/local/bin/casperjs --web-security=no

Upvotes: 1

Related Questions