r_post(url, json, content_type, apikey);
        data.onerror = function (e) {
            rtext = "error";
        }

        async function isResponseReady() {
            return new Promise(function (resolve, reject) {
                if (rtext == "error") {
                    resolve(rtext);
                }
                if (!data.responseText || data.readyState != 4) {
                    setTimeout(async function () {
                        let msg = await isResponseReady();
                    