@mapbox/corslite
npm i @mapbox/corslite

@mapbox/corslite

an ajax library for everyone and domains

by mapbox

0.0.7 (see all)License:BSDTypeScript:Not Found
npm i @mapbox/corslite
Readme

a floating can of corslite

corslite

Build Status

corslite('http://b.tiles.mapbox.com/v3/tmcw.dem.json', function(err, resp) {
    // resp is the XMLHttpRequest object
}, true); // cross origin?

an AJAX library focused on simplicity and supporting IE8-10 with cross domain requests.

We're making a deal with the devil and using XDomainRequest in hopes that it is less a hack than JSONP. This comes with caveats:

  • No headers are permitted on requests
  • Only 'GET'
  • No access error diagnostics (status code, response body) on IE

Downloads/wk

9.7K

GitHub Stars

89

LAST COMMIT

5yrs ago

MAINTAINERS

1

CONTRIBUTORS

6

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
0.0.7
latest
5yrs ago
No alternatives found
No tutorials found
Add a tutorial