OL needs to support CORS and the HTTP 1.1 OPTIONS request method
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Open Library |
New
|
Medium
|
Anand Chitipothu |
Bug Description
This particularly effects users who are trying to use jquery to access the OL API.
If you try to retrieve JSONP data using jquery's $.ajax(), $.getJSON() or related methods, jquery first makes a preflight request, as described in the CORS spec (http://
So a request for $.getJSON('http://
Workaround for jquery users:
If you use $.ajax() instead of $.getJSON() and set the dataType parameter to 'script', jquery will not make the OPTIONS request and just use the script src method to pull the data instead:
$.ajax({url: 'http://
Changed in openlibrary: | |
assignee: | nobody → Anand Chitipothu (anandology) |
importance: | Undecided → Medium |
milestone: | none → general-bucket |