dist/crocodoc.viewer.js
function parseOptions(options) {
        options = util.extend(true, {}, options || {});
        options.method = options.method || 'GET';
        options.headers = options.headers || [];
        options.data = options.data || '';
        options.withCredentials = !!options.withCredentials;

        if (typeof options.data !== 'string') {
            options.data = $.param(options.data);
            if (options.method !== 'GET') {
                options.data = options.data;
                options.headers.push(['Content-Type', 'application/x-www-form-urlencoded']);
            }
        }
        return options;
    }
function parseOptions(options) {
        options = util.extend(true, {}, options || {});
        options.method = options.method || 'GET';
        options.headers = options.headers || [];
        options.data = options.data || '';
        options.withCredentials = !!options.withCredentials;

        if (typeof options.data !== 'string') {
            options.data = $.param(options.data);
            if (options.method !== 'GET') {
                options.data = options.data;
                options.headers.push(['Content-Type', 'application/x-www-form-urlencoded']);
            }
        }
        return options;
    }
function parseOptions ( options ) { options = util . extend ( true , { } , options || { } ) ; options . method = options . method || 'GET' ; options . headers = options . headers || [ ] ; options . data = options . data || '' ; options . withCredentials = ! ! options . withCredentials ; if ( typeof options . data !== 'string' ) { options . data = $ . param ( options . data ) ; if ( options . method !== 'GET' ) { options . data = options . data ; options . headers . push ( [ 'Content-Type' , 'application/x-www-form-urlencoded' ] ) ; } } return options ; }
Parse AJAX options
@param   {Object} options The options
@returns {Object}         The parsed options
Parse AJAX options