A basic REST example, where I'm doing a GET for some sample user data that appears below.
The example data comes from http://jsonplaceholder.typicode.com and api.flickr.com
Fetching...
getData('GET', 'https://jsonplaceholder.typicode.com/users').then(function (data) {}
Flickr API - get list of camera manufacturers
var baseReq = 'https://www.flickr.com/services/rest/';
                        var method = 'method=flickr.cameras.getBrandModels';
                        var argument = 'brand=' + brand;
                        var boilerPlate = 'api_key=uniquehash&format=json&nojsoncallback=1';
                        var req = baseReq + '?' + method + '&' + argument + '&' + boilerPlate;
                        getData('GET', req).then(function (data) {}
Flickr API - Get list of all Apple cameras.
var baseReq = 'https://www.flickr.com/services/rest/';
            var method = 'method=flickr.cameras.getBrands';
            var boilerPlate = 'api_key=uniquehash&format=json&nojsoncallback=1';
            var req = baseReq + '?' + method + '&' + boilerPlate;
            getData('GET', req).then(function (data) {)