dancrew32 / AWESOME-JS

A Lightweight JavaScript Framework that performs common tasks (IE6, 7, 8, FF, WK, Opera)
awesomejs
2 stars 0 forks source link

ajax get request needs headers set #12

Closed dancrew32 closed 13 years ago

dancrew32 commented 13 years ago

need to add

req.setRequestHeader('X-Requested-With', 'XMLHttpRequest');

after req.open('GET', url, true);

or else request sniffing backends (like the one on cakephp) wiil not be able to set variables for things like $this->RequestHandler->isAjax()