Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
user19
Contributor
Contributor

Add header element in cHttp in Route

Hello,

I have a scenerio. I am retreiving fingerprints of certificate in C processor component. After getting the fingerprints I want to put the fingerprints as a header in cHttp component as it should call an existing endpoint and in response I should get a token. In Advance settings of cHttp component I tried it as key = fingerprint, value= ${header.fingerprint but it did not get fingerprint. it is printed it as a string on console. It only works if I give a constant value of fingerprint manually. e.g key = fingerprint, value = 841753ad7699018c434c35dba51. So my question is how can I get the value of fingerprint in cHttp component ? any help would be appreciated.and the condition is0695b00000OCql4AAD.png

Labels (3)
2 Replies
kakooo16
Creator
Creator

you have to store your value (i will suppose its name is fingerprint ) in a gloabal varaible .

to do this you have 2 options either use a tjava ( globalMap.put("fingerprint "), row1.fingerprint )

and then get the global variable using this globalMap.get("fingerprint ")

Then in cHttp_1 pass the value globalMap.get("fingerprint ")

 

or , try using a tsetglobalvariable component see documentation here https://help.talend.com/r/oApq_IF_zN1NFA_hv2494Q/QZyYO6k~Q8rZJHIwR5J16Q

 

Then as in first option pass the global variable globalMap.get("fingerprint ")

 

Or pass your variable with a context varaible .

Thanks

Anonymous
Not applicable

Where are you originally setting the value of ${header.fingerprint}? Is this being set in the cProcessor? Because if this header exists, it should be being passed to the service you are calling. You are overwriting it with a constant value in the screenshot above.