xhr.responseText Stremed response i.e. XMLHttpRequest.LOADING

I’m writing an app but the xhr.responseText property isn’t updating as new chunks of text are being added, it only console logs the first word.

Is this an issue with QML/JS?

    xhr.onreadystatechange = function () {
        if (xhr.readyState === XMLHttpRequest.DONE ||
            xhr.readyState === XMLHttpRequest.LOADING) {

            console.log("ChatAPI.sendMessage(): Response received");
            console.log("ChatAPI.xhr.status: " + xhr.status);
            console.log("ChatAPI.xhr.responseText: " + xhr.responseText);

Right now SF is using a very old version of the QT stack. You could try to use the Duperagent HTTP client and see if it works better. I have used it for a SailfishOS application and it works for my needs. It also has a promise API, which is nice.