Error firefox IPV6 VUE.JS XMLHttpRequest

Hi!. I need help to solve the problem in the XMLHttpRequest component when using the firefox browser with IPV6 when sending the url http: // [:: 1]: 8080 / rest / app
Uncaught (in promise) DOMException: The URI is malformed.
The problem exists line: xhr.open(request.method,request.getUrl(), true);
thanks

Code below:

function xhrClient (request) {
return new PromiseObj(function (resolve) {

    var xhr = new XMLHttpRequest(),
        handler = function (event) {

        var response = request.respondWith('response' in xhr ? xhr.response : xhr.responseText, {
            status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug
            statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)
        });

        each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) {
            response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
        });

        resolve(response);
    };

    request.abort = function () {
        return xhr.abort();
    };

    if (request.progress) {
        if (request.method === 'GET') {
            xhr.addEventListener('progress', request.progress);
        } else if (/^(POST|PUT)$/i.test(request.method)) {
            xhr.upload.addEventListener('progress', request.progress);
        }
    }

    xhr.open(request.method,request.getUrl(), true);

    if ('responseType' in xhr) {
        xhr.responseType = 'blob';
    }

    if (request.credentials === true) {
        xhr.withCredentials = true;
    }

    request.headers.forEach(function (value, name) {
        xhr.setRequestHeader(name, value);
    });

    xhr.timeout = 0;
    xhr.onload = handler;
    xhr.onerror = handler;
    xhr.send(request.getBody());
});

}