hi,
I'm trying to send some values in a form to some server. Is this possible?
I have:
var xhttp = new XMLHttpRequest();
var form = new FormData();
form.append("temp_sensor", 1);
form.append("hum_sensor", 2);
xttp.open("POST", "127.0.0.1:5000/update_sensor", false);
xttp.send(form);
but I got this error:
Async Execution Failed in ServerCom_sendSensorInfo [Execution error in service script [sendSensorInfo] :: ReferenceError: "FormData" is not defined. (sendSensorInfo#1)]
Best Regards
Solved! Go to Solution.
Hi, it's version 8.
I already know that I'm doing one thing wrong. I was using localhost server but thingworx isn't in my machine. That's why the connection failed. Sorry!
I will fix this, then if I got any problems I comeback here. Sorry once again for taken your time
Hi @Gmachado14 which ThingWorx version are you working with? Additionally, could you have the logging subsystem in the stack strace mode by navigating to System > Subsystems > LoggingSubsystem > Configuration and check the Enable Stack Tracing box to enable (server restart not needed).
Then reproduce this issue and please share with us the applicationlog, scriptlog & errorlog from ThingWorx.
Hi, it's version 8.
I already know that I'm doing one thing wrong. I was using localhost server but thingworx isn't in my machine. That's why the connection failed. Sorry!
I will fix this, then if I got any problems I comeback here. Sorry once again for taken your time