let HttpManager = {

    httpPost(url, cb) {
        // var remoteUrl = AppConst.HTTPURL + "/config/popStarConfig.json";
        let xhr = new XMLHttpRequest();
        xhr.onreadystatechange = function () {
            if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status < 400)) {
                let response = xhr.responseText;
                let obj = JSON.parse(response)
                cb && cb(1, obj);
            } else {
                cb && cb(-1, xhr.responseText);
            }
        };
        xhr.open("GET", url, true);
        xhr.send();
    }

}
module.exports = HttpManager;
