Newer
Older
const requestConfig = {
url: `${window.COLLABORA_URL}hosting/discovery`,
};
return axios(requestConfig).then(response => {
const apps = response.request.responseXML.querySelectorAll(
"net-zone[name='external-http'] app"
);
const results = [];
for (let i = 0; i < apps.length; i++) {
const app = apps[i];
const action = app.querySelector("action");
const mimeType = app.getAttribute("name");
const ext = action.getAttribute("ext");
const urlsrc = action.getAttribute("urlsrc");
results.push({
mimeType,
ext,
urlsrc
});
}
});
};
module.exports = CollaboraAPI;