function request(verb, url, options) {
        return new Promise(function(resolve, reject) {
            var args = {};

            options = options || {};
            args.url = url;
            args.type = verb;
            args.headers = options.headers;
            args.data = options.data;
            args.dataType = options.dataType;

            $.ajax(args)
                .done(function onDone(data, status, jqXHR) {
                var payload = [
                data,
                jqXHR.status,
                convertResponseHeaders(jqXHR.getAllResponseHeaders())];

                resolve(payload);
            })
                .fail(function onFail(jqXHR) {
                reject(jqXHR.status)
            });
        });
    }
A request wrapper around the jQuery AJAX function.

options:

    headers: {Object}

        The HTTP headers

    data: {Object || String} (optional)

         The HTTP request body payload.

    type: {String} (optional; default = "Intelligent Guess")

         The type of data expected from the server.

@param {String} verb The HTTP verb (e.g. POST, PUT, etc.)
@param {String} url The URL endpoint to which the request should be send.
@param {Object} options The jQuery request configuration.