javascriptajaxcordovarssodesk

ajax 302 Moved Temporarily when call odesk rss feed


When I fetching data from an Odesk feed I am get 302 Moved Temporarily error, but when I open the same url in my browser, the content is there: what are we doing wrong?

var url = "https://www.odesk.com/jobs/rss?nbs=1&g=&q=";     
        var x = new XMLHttpRequest();               
        x.onreadystatechange = function() {

            alert(x.status);

            if (x.readyState == 4 && x.status == 200) {
                doc = x.responseXML;


            }
        };
    x.open("GET", url, true);
        x.send();

Solution

  • It was my fault that i was trying that in localhost.. it worked fine in phone.