How to call system property into rest message header.

dgarad
Tera Sage

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

How to achieve this? Thanks in advance

1 REPLY 1

Ankur Bawiskar
Tera Patron

@dgarad 

you can set the header dynamically

something like this

var request = new sn_ws.RESTMessageV2();
request.setEndpoint('https://dev22614.service-now.com/api/now/table/u_cart_order');
request.setHttpMethod('POST');

request.setRequestHeader('headerName', gs.getProperty('propertyName'));