examples/HTML StarterKit/lib/durandal/js/plugins/http.js
function (url, query, callbackParam) {
            if (url.indexOf('=?') == -1) {
                callbackParam = callbackParam || this.callbackParam;

                if (url.indexOf('?') == -1) {
                    url += '?';
                } else {
                    url += '&';
                }

                url += callbackParam + '=?';
            }

            return $.ajax({
                url: url,
                dataType:'jsonp',
                data:query
            });
        }
function (url, query, callbackParam) {
            if (url.indexOf('=?') == -1) {
                callbackParam = callbackParam || this.callbackParam;

                if (url.indexOf('?') == -1) {
                    url += '?';
                } else {
                    url += '&';
                }

                url += callbackParam + '=?';
            }

            return $.ajax({
                url: url,
                dataType:'jsonp',
                data:query
            });
        }
function ( url , query , callbackParam ) { if ( url . indexOf ( '=?' ) == - 1 ) { callbackParam = callbackParam || this . callbackParam ; if ( url . indexOf ( '?' ) == - 1 ) { url += '?' ; } else { url += '&' ; } url += callbackParam + '=?' ; } return $ . ajax ( { url : url , dataType : 'jsonp' , data : query } ) ; }
Makes an JSONP request.
@method jsonp
@param {string} url The url to send the get request to.
@param {object} [query] An optional key/value object to transform into query string parameters.
@param {string} [callbackParam] The name of the callback parameter the api expects (overrides the default callbackParam).
@return {Promise} A promise of the response data.
Makes an JSONP request .