var JsonClient = Titanium.Network.createHTTPClient();
// API Url to call
var url = "";
JsonClient.open("POST", url, true);
JsonClient.onload = function () {
// after processing the response
json = null;
}
JsonClient.onerror = function (e) {
actAllergyInd.hide();
Ti.UI.createAlertDialog({
title: 'Error',
message: JsonClient.statusText,
buttonNames: ['Ok']
}).show();
};
}
//setting Request Header
JsonClient.setRequestHeader("Content-type", "application/json");
JsonClient.send(data);
JsonClient = null;
I want to set my JsonClient object to null as well as the Json response which i am getting to null. Am i doing it in the right way?