| This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal. |
| This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal. |
@Livm Bvll ,
you can directly call your services using http api's. PFB for sample code:
function invokeService1() {
var jsonBody = {
"ufid": "ABC",
"appId": "1235",
};
var url = "serviceurl";
var request = new kony.net.HttpRequest();
request.onReadyStateChange = onReadyStateChange;
request.open(constants.HTTP_METHOD_POST, url, true);
request.setRequestHeader("Content-Type", "application/json");
request.setRequestHeader("X-Device-AuthToken", "your_auth_token_if_set");
request.send(jsonBody);
}
function onReadyStateChange() {
if (this.readyState == constants.HTTP_READY_STATE_DONE) {
var response = this.response;
if (this.status == 200) {
alert("success response");
} else {
alert("Error response");
}
}
}
@ashok ganta so we can connect kony app to firebase for example ?
@Livm Bvll ,
Yes, you can connect to firebase using rest API's. The only thing is "PUT" method will not works in Visualizer starter version. So, if you want to show some list it's ok, but if want update something in firebase it will not works.
All http methods works in Kony Enterprise Version.
Note: Firebase data will not sticks with UI, you have to make http call to get updated records every time.
Many thanks for the reply and help :D