src/clientVueLoader.js
// Performs an http get request.
Performs an http get request.
Performs an http get request .
static async httpRequest(url) {
            return new Promise(function (resolve) {
                const xhr = new XMLHttpRequest();
                xhr.open('GET', url);
                xhr.onreadystatechange = function () {
                    if (xhr.readyState === 4) {
                        if (xhr.status >= 200 && xhr.status < 300) {
                            resolve(xhr.responseText);
                        } else {
                            throw new Error("[error] Cannot load " + url);
                        }
                    }
                };
                xhr.send(null);
            });
        }
static async httpRequest ( url ) { return new Promise ( function ( resolve ) { const xhr = new XMLHttpRequest ( ) ; xhr . open ( 'GET' , url ) ; xhr . onreadystatechange = function ( ) { if ( xhr . readyState === 4 ) { if ( xhr . status >= 200 && xhr . status < 300 ) { resolve ( xhr . responseText ) ; } else { throw new Error ( "[error] Cannot load " + url ) ; } } } ; xhr . send ( null ) ; } ) ; }
Performs an http get request.
Performs an http get request .