How to add system property into rest message.

Pratik Khamkar
Tera Contributor

We have a requirement to to call the system property (wich contains API and APP Key) into Rest Message hearder.

How to achieve this? Thanks in advance

1 ACCEPTED SOLUTION

Karan Chhabra6
Mega Sage
Mega Sage

Hi @Pratik Khamkar ,

 

You can pass the property value in a variable like below and then add this variable in your HTTP header

var restMessage = new sn_ws.RESTMessageV2('your REST message name', 'post'); 
restMessage.setStringParameterNoEscape('AppKey', gs.getProperty('system_property_name')); 

KaranChhabra6_0-1682379045506.png

 

If my answer has helped with your question, please mark it as correct

 

Thanks!!

View solution in original post

1 REPLY 1

Karan Chhabra6
Mega Sage
Mega Sage

Hi @Pratik Khamkar ,

 

You can pass the property value in a variable like below and then add this variable in your HTTP header

var restMessage = new sn_ws.RESTMessageV2('your REST message name', 'post'); 
restMessage.setStringParameterNoEscape('AppKey', gs.getProperty('system_property_name')); 

KaranChhabra6_0-1682379045506.png

 

If my answer has helped with your question, please mark it as correct

 

Thanks!!