Request the network in the script

How to request a network interface in a.DocBuilder script

builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph, oRun;


function request(url,method,callback) {
  let xhr = new XMLHttpRequest();
  xhr.open(method,url,true);
  xhr.onreadystatechange = function () {
    if (xhr.readyState === 4 && xhr.status === 200) {
      callback(xhr.responseText);
    }
  };
  xhr.send(null);
}

request('get', 'https://example.com/xxx.do', function (res) {
    console.log(res); 
})

oParagraph = Api.CreateParagraph();
oParagraph.AddText("111");
oDocument.Push(oParagraph);

builder.SaveFile("docx", "SampleText.docx");
builder.CloseFile();

Execution prompt:Result without file

Can you see what the problem is, please

Hi @css

What is the format of the information located at the following link: https://example.com/xxx.do?

What specific content are you attempting to add to the document?

https://example.com/xxx.do,Is an interface
Try to add a method to request the network in the document, but you get an error
Can I add a request network interface to the document? What are the ways to get data?

Hey @css
Unfortunately, at the moment, this capability is not available. :crying_cat_face:
Our developers are currently exploring potential implementation options.