Outbound Rest API throwing error

balaji_prusty1
Tera Guru

Hi Team,

 

I need to integrate SNOW to SNOW using App Studio. I have created Outbound REST (POST) to send data. When I test this connection in  REST Messages, it works and gives 201 (success). 

 

balaji_prusty1_0-1711384822207.png

 

But when I try to use it in the Script-include it gives the error "function getStatusCode() {[native code, arity=0]}"

 

Here is the Below script that I am passing through Script-Include but getting error "function getStatusCode() {[native code, arity=0]}"

===============================

var r = new sn_ws.RESTMessageV2('API Integration', 'Acknowledge Service Ticket');
r.setStringParameterNoEscape('TicketNumber', current.u_external_ticket_no);
r.setStringParameterNoEscape('CustomerTicketNumber', current.number);
gs.info(r);
var response = r.executeAsync();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode;
gs.info(httpStatus);
var parser = new global.JSON();
var responseObj = parser.decode(responseBody);
return responseObj;

=========================

Need help on this, if anyone found this issue and a solution for this.

 

Thanks

Balaji Prusty