Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi Experts,
Would be possible to populate a parameter value from a Rest Server coding a javascript on home.js?
I have a IoT Gateway on Kepware which reads values from controllers and publish those on a Rest Server, then I need to use those values on Vuforia Studio WHITHOUT ThingWorx.
This requirement is because I do not want to have (pay for) ThingWorx to act just as a gateway since I just need real-time values on Vuforia Studio.
I know ThingWorx is there with Vuforia, but in order to use it to collect this data on Things I would need to license it, right?
All ideas is welcome.
Many Thanks,
Felipe Duarte
Solved! Go to Solution.
Hello FbdSilva,
Yes in https, it should work.
I used this Javascript code in my test :
function GetDataREST ()
{
console.log('GetDataREST');
fetch('https://ghibliapi.herokuapp.com/films')
.then(response => response.json())
.then(json => {console.log(json); })
.catch(error =>{ console.error(error);})
}
GetDataREST();
Best regards,
Samuel
Hello fbdsilva,
Please read this post from Roland :
Yes, it is possible but only for https.
When using http URL to fetch data, it is not working.
Best regards,
Samuel
Hi Samuel,
Thanks for replying.
Yes, I have read that post before but there it is showing how to make that from ThingWorx.
Just to be clear, if I used those javascript from the very beginning of the post with https it would work? Because I have tested a lot and could not make it work but I will try again if it is possible.
Thanks,
Felipe Duarte
Hello FbdSilva,
Yes in https, it should work.
I used this Javascript code in my test :
function GetDataREST ()
{
console.log('GetDataREST');
fetch('https://ghibliapi.herokuapp.com/films')
.then(response => response.json())
.then(json => {console.log(json); })
.catch(error =>{ console.error(error);})
}
GetDataREST();
Best regards,
Samuel
Many thanks Samuel!