views:

8

answers:

0

Here is my code where I am trying to call yahoo api via Ajax to find current weather:

var query = "select * from weather.forecast where location in ('UKXX0085','UKXX0061','CAXX0518','CHXX0049') and u='c'";
var url = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent(query) +'&rnd=1344223&format=json&callback=jsonp1285353223470';

new Ajax.Request(url, {
   method: 'get',
   onComplete: function(transport) {
      alert(transport.Status); // say 'null'
      alert(transport.responseText); // say ''
   }
});

I noticed, that instead of GET firebug says OPTIONS. What is it and how I can use force prototype to use GET?

Here is functionality which i am trying to recreate: http://www.zazar.net/developers/zweatherfeed/

update: And here is full URL which I am trying to access: http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20location%20in%20(%27UKXX0085%27%2C%27UKXX0061%27%2C%27CAXX0518%27%2C%27CHXX0049%27)%20and%20u%3D%27c%27&rnd=1344223&format=json&callback=jsonp1285353223470