Adding arbitrary HTTP headers in messages by overriding the userdata items
In addition to the GUI configuration, CAA-WS Clients and raw Clients also provide a series of userdata override APIs. These APIs provide additional flexibility on message customization for message-by-message in TPS.
You can add arbitrary HTTP headers to messages for both WS Clients and Raw Clients.
For example, to create a new TPS proc and set it for use on any UPOC point available on the message flow trace in the engine:
- This is found on the Network Configurator's Outbound tab at TPS Outbound Data.
For example,
UpdateClientMessageAttachmentCont
. - In the TPS run mode code, the typical code piece to add HTTP headers is similar to:
keylget args MSGID mh set userdata [msgmetaget $mh USERDATA] keylset httpRequestHeaders <http header key> <the value for the key> keylset userdata httpRequestHeaders $httpRequestHeaders msgmetaset $mh USERDATA $userdata
- A complete table with available interfaces is located in the "Infor Cloverleaf Application
Adapter Web Services User Guide" at
For example, to add the Bearer type Authorization HTTP header in a request:
keylget args MSGID mh set userdata [msgmetaget $mh USERDATA] keylset httpRequestHeaders Authorization "Bearer $::token" keylset userdata httpRequestHeaders $httpRequestHeaders msgmetaset $mh USERDATA $userdata
. - You can add any header with this method, regardless of whether it is public-defined.
- In the actual outbound HTTP message, this is found in the HTTP header section of your customizations.