browser-get

0.2.0 • Public • Published

browser-get Build Status

IE8+ compatible GET requests for the browser. Includes an ES6 promise polyfill.

Installation

Grab the dist/browser-get.js file and include it at the bottom of your page:

<script src="browser-get.js"></script>

Or use Browserify:

npm install browser-get --save
var get = require('browser-get');

Usage

 
// Returns an ES6 promise.
var promise = get('foo/bar/something-or-other.whatever');
 
// When request completes.
promise.then(function( resp ){
  console.log( resp );
});
 
// If request fails.
promise.catch(function( resp ){
  console.log( resp );
});
 

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

Copyright (c) 2014 Chris Contolini
Licensed under the MIT license.

Package Sidebar

Install

npm i browser-get

Weekly Downloads

2

Version

0.2.0

License

MIT

Last publish

Collaborators

  • contolini