Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello,
If there was an existing IoT application already deployed that has relevant data for my Vuforia Experience, is there a way to get data directly from this 3rd party application, or must the data pass through a Thingworx entity property or service first and then into the Vuforia Experience?
Thanks!
Solved! Go to Solution.
So, this piece of code is running on my project:
$scope.your_api_name = function() {
var your_url= 'http://<your_url_domain>';
var data_on_json_format ={'name': your_name, 'surname': your_surname};
var req = {// aggiunta Giovanni Panozzo 9.10.2020
method: 'POST',
url: your_url,
headers: {
'Content-Type': 'text/plain'
}, data: data_on_json_format
};
$http(req).then(function (response) { //chiamata api_svc_ricevicarrello
console.log(">> OK: your_api_name");
console.warn(response);
},function (response) {
console.log(">> ERR: your_api_name")
}
);
}
Hi,
I think you could also use http get/post method for sending/receiving data.
Take a look to: https://docs.angularjs.org/api/ng/service/$http
So, this piece of code is running on my project:
$scope.your_api_name = function() {
var your_url= 'http://<your_url_domain>';
var data_on_json_format ={'name': your_name, 'surname': your_surname};
var req = {// aggiunta Giovanni Panozzo 9.10.2020
method: 'POST',
url: your_url,
headers: {
'Content-Type': 'text/plain'
}, data: data_on_json_format
};
$http(req).then(function (response) { //chiamata api_svc_ricevicarrello
console.log(">> OK: your_api_name");
console.warn(response);
},function (response) {
console.log(">> ERR: your_api_name")
}
);
}
Thanks. I'll give it a try.
Worked for me, thanks!
Simple GET from world clock API updates the text of a 3D label.