[SOLVED] $.getJSON doing OPTIONS instead of GET
hi all,
i'm doing the following:
-
$.getJSON("http://localhost:1429/Services.HelloMusic/MusicService.svc/GetArtists",
function (artists) {
alert("worked");
});
and it wasn't working, so i went and listened to the request (via fiddler) and i saw that it was actually doing this:
-
OPTIONS /Services.HelloMusic/MusicService.svc/GetArtists HTTP/1.1
why would it do that? when i do this:
-
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=feces&tagmode=any&format=json&jsoncallback=?",
function (data) {
$.each(data.items, function (i, item) {
$("<img/>").attr("src", item.media.m).appendTo("#images");
if (i == 3) return false;
});
});
on the same page, it's sending a GET request:
-
GET /services/feeds/photos_public.gne?tags=feces&tagmode=any&format=json&jsoncallback=jsonp1261864148457&_=1261864226564 HTTP/1.1
why would it do a GET for the flikr call and an OPTIONS for my call?