web request from draw.io

529 Views Asked by At

I am developing a plugin for the desktop version of drawio. The objective is to be able to make a request to a web service with the generated XML. I have tried different methods but have not succeeded. Is it possible that a request cannot be made from drawio?

I have tried with fetch, XMLHttpRequest (), but I have not obtained any results, I think it is because drawio does not support it.

I have also tried the methods that drawio provides. mxXmlRequest. Example I have used:

var onload = function (req) {
  //mxUtils.alert (req.getStatus ());
  mxUtils.popup (req, true);
}

var onerror = function (req) {
  mxUtils.alert ('Error');
}

new mxXmlRequest('https://chowlk.linkeddata.es/api', final, 'POST')
  .send(onload, onerror);

Does anyone know how to solve my problem?

Thanks

0

There are 0 best solutions below