Dynamic Headers
- 05 Dec 2022
-
DarkLight
-
PDF
Dynamic Headers
- Updated on 05 Dec 2022
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
In some cases, dynamic headers should be added to a call. This can include changing the content-type, providing audit headers, or supplying other headers needed on the request.
-
Dynamic headers can be encoded in the adapter.js, or you can pass them into adapter.js and then add a method param.
-
If headers are the same on every call and static, consider using a global_request property to define the headers instead of adding them into every method in the adapter.js.
Example: Dynamic headers.
const reqObj =
payload: { garbage: 'need since post' },
uriPathVars: [groupId, deviceId],
uriQuery: { name: 'anyname' },
uriOptions: { page: 2 },
addlHeaders: { audit: 'turnOn' },
authData: { domain: 'abc' },
callProperties: {
stub: true,
request: {
attempt_timeout = 60000
}
},
filter: '[*name=doggie]',
priority: 1,
event: 'giveMeMyData'
};
Was this article helpful?