Sha256: 0297a129bd5f00ba959ffd898d1e3cd676576c103bee39453b722cb19ca8c2d8
Contents?: true
Size: 555 Bytes
Versions: 24
Compression:
Stored size: 555 Bytes
Contents
<!doctype html> <body> <h1>Cross Domain Request</h1> <div id="result"></div> <script type='text/javascript' src='http://code.jquery.com/jquery-1.8.2.min.js'></script> <script type='text/javascript'> $(function () { $.ajax( { url: 'http://example.com/api', method: 'GET', contentType: 'json' // setting this forces an OPTIONS request } ).done(function(data) { $('#result').append('Success!'); }) .fail(function(data) { $('#result').append('Fail!'); }); }) </script> </body>
Version data entries
24 entries across 24 versions & 1 rubygems