lrgalego · GitHub

Folders and files

NameName

Last commit message

Last commit date

jQuery plugin to make Cross Domain Requests with JavaScript without jsonp.

To receive some response for this calls, you have to add the Access-Control-Allow-Origin HTTP header.

Samples

  1. Submitting a request

    $.safeXDR('http://sampleurl', {param1:'value1'});
  2. Enable cache

    $.safeXDR('http://sampleurl', {param1:'value1', cache:true});
  3. Receiving response (Needs Access-Control-Allow-Origin):

    $.safeXDR('http://sampleurl', {param1:'value1'}, function(result){
        console.log(result);
    });

Read the original on github.com ↗