This is because MooTools associates some additional files with request headers.
eg. if your htaccess says:
Header set Access-Control-Allow-Origin: *
you need to write your request as follows:
var foo = new Request({ url: 'http://fragged.org/Epitome/example/data/', method: 'get', onComplete: function (data) { // returns an object with name and surname new Element('div[html="{name} {surname}"]'.substitute(JSON.decode(data))).inject(document.body); } }); // need to remove that or CORS will need to match it specifically delete foo.headers['X-Requested-With']; foo.send();
That is why you see only the preliminary OPTIONS instructions. You don't like it :)
You can modify .htaccess in the same way as X-Requested-With , which is probably some additional "security".
See http://jsfiddle.net/7zUSu/1/ for a working example. I did this a while ago when I wanted to get this change in the Request https://github.com/mootools/mootools-core/issues/2381 fixed.
source share