How to handle a getAppController.sendRequest response?

Interested in talking about Mash-up's? This is the place.
User avatar
rcardozo1987
Posts: 8
Joined: Tue Sep 10, 2019 9:14 pm

How to handle a getAppController.sendRequest response?

Postby rcardozo1987 » Wed Sep 11, 2019 8:43 pm

Hi guys,

I need to check a response for a CreateSignatureRequest (I need to get its ID) and I don't know how to do it. I am using this kind of request:

Code: Select all

 
 
   var request = jsonObj.BatchRequest;
   
   request.CreateSignatureRequest = { _jsns:"urn:zimbraAccount", requestId:"0" };
   request.CreateSignatureRequest.signature = {
           name : signatureContent.name ,
      content : {
         type : signatureContent.contentType,
         _content: signatureContent.content
      }
   };
   
   // send CreateSignatureRequest
   appCtxt.getAppController().sendRequest ({
           jsonObj:jsonObj,
           asyncMode:true,
           errorCallback:errorCallback,
           callback:successCallback
       });
   


Does anyone have any tips? Is the response being sent to successCallback function? Thanks!


User avatar
rcardozo1987
Posts: 8
Joined: Tue Sep 10, 2019 9:14 pm

Re: How to handle a getAppController.sendRequest response?

Postby rcardozo1987 » Fri Sep 13, 2019 2:47 am

Hey everyone,

I've just found how it works... the 'response' object is sent to the callback function as its first argument... so, you can have a .getResponse() method within your callback :)

Simple like that.

Return to “Zimlets”

Who is online

Users browsing this forum: No registered users and 2 guests