Hello!
I'm starting with zimlets, and i have problems
i'm making a zimlet, this zimlet call a API, with this method,
Code:
http://randomurl.com/user_sistem?user=MYUSER&pass=MYPASS
This url return me a file XML with de ID of my account.
I'm using this example for de wiki, but i modify for direct acces, non proxy
Code:
com_zimbra_example_httpgetpost_HandlerObject.prototype._executeExternalHttpGet =
function() {
var url = "http://randomurl.com/user_sistem?";
var param ="user=MYUSER&pass=MYPASS";
var to= url+param;
// submit the URL and asynchronous response (using callback)
AjxRpc.invoke(null, to, null, new AjxCallback(this, this._httpExternalGetCallback), false);
};
com_zimbra_example_httpgetpost_HandlerObject._executeExternalHttpGet
com_zimbra_example_httpgetpost_HandlerObject.prototype._httpExternalGetCallback =
function(response) {
if (response.success == false) {
// display the error response
appCtxt.getAppController().setStatusMsg("Error: " + response.text, ZmStatusView.LEVEL_WARNING);
return;
}
// display the response
appCtxt.getAppController().setStatusMsg(response.text);
}; When i call for this, firebug send my GETMINICALLREQUEST : Aborted X
This is de best method to do this? Another method?
Thx
