FUXA icon indicating copy to clipboard operation
FUXA copied to clipboard

Can I call a get request on another web server by FUXA Script?

Open Pichitor opened this issue 2 years ago • 1 comments

Something like this: const Http = new XMLHttpRequest(); const url='https://jsonplaceholder.typicode.com/posts'; Http.open("GET", url); Http.send();

Pichitor avatar May 15 '22 04:05 Pichitor

The script is executed in the nodejs server, not in the client, XHR is not natively supported on nodejs, it can only be used in browsers, or adding a module that implements it. You have to use native nodejs implementations such as Http module or add a custom dependency.

AngelFernandezSobrino avatar May 15 '22 22:05 AngelFernandezSobrino

Hi, Recently @mauroalexandre added the possibility to run a script in frontend. did you try?

unocelli avatar Oct 09 '22 19:10 unocelli

I assume the issue has been resolved in the meanwhile. I'm therefore going to close this issue.

unocelli avatar May 14 '23 20:05 unocelli