How to call system property into rest message header.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 03:52 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 04:04 AM
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'));