How to create a header for REST calls when using Javelin

book

Article ID: 196930

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

We are using Javelin to make REST API calls.
We need to add custom headers to the Javelin call how can we do this?

 

Environment

TDM 4.9
Javelin 4.8.X

 

Resolution

The header field requires as Collection of <String> Values when using the REST PUT Activity.
By default this is not imported namespace:

In Javelin go to the imported namespace on the imports tab near variables.
type in the following to add the proper collections.

System.collection.Generic
System.collection.ObjectModel.

Then in the Rest PUT Activity, you can create a header such as:

Another example:

new collection (of string) from {"Authorization","Bearer "& token,"Originating-Workflow-Id","TDCT_N2B_DA_Credit"}

you can add multiple pairs of header configuration as needed.

 

Attachments