Skip to main content
edited title
Link
Morteza Milani
  • 1.2k
  • 3
  • 20
  • 30

Ajax And REST: Can I send an ajax request to a REST service andto recieve response?

Source Link
Morteza Milani
  • 1.2k
  • 3
  • 20
  • 30

Ajax And REST: Can I send an ajax request to a REST service and recieve response?

I want to use mootools and SqueezBox class to handle a request to a RESTful service. I don't want to use any server-side script. I am using AJAX. I send a request to the following url using GET method. http://www.idevcenter.com/api/v1/links/links-upcoming.json but I receive a 404 error. Is it because cross-site scripting? here is my code:

 SqueezeBox.initialize({handler:'url',ajaxOptions:{method:'GET'}}); $('a.modal').addEvent('click',function(e){ new Event(e).stop(); SqueezeBox.fromElement($('a.modal')); }); 

In Firebug console, sometimes 'aborted' is shown and sometimes '404'.what is wrong with that?