UNPKG

623 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const core_1 = require("@akala/core");
4const xml2js = require("xml2js");
5core_1.FetchHttp.prototype['getXML'] = function (url) {
6 return this.call({ url: url, method: 'get' }).then(r => r.text().then(text => {
7 return new Promise((resolve, reject) => {
8 xml2js.parseString(text, { async: true }, function (err, result) {
9 if (err)
10 reject(err);
11 else
12 resolve(result);
13 });
14 });
15 }));
16};
17//# sourceMappingURL=http.js.map
\No newline at end of file