        });

                params.success(obj, headerMap);
            } else if (xhr.readyState == 4 && xhr.status >= 400) {
                params.error(xhr);
            }
            if (xhr.readyState == 1) {
                let requestMap = {};
                requestMap.url = params.url;
                requestMap.headers = {};
                if (params.beforeSend) {
                    params.beforeSend(requestMap);
                }
                for (let key in requestMap.headers) {
         