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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
olja
Contributor
Contributor

Calling rest service with header which is provided by a previous rest call?

Hi,

 

now I am able to call a rest service which provides me a repsonse like this

 

[tLogRow_1] Body: {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzeXNhZG0iLCJyb2xlcyI6WyJBRE1JTiIsIlNFUlZJQ0UiXSwiQXV0aG9yaXRpZXMiOlt7ImF1dGhvcml0eSI6IkFETUlOIn0seyJhdXRob3JpdHkiOiJTRVJWSUNFIn1dLCJleHAiOjE1ODgxNTI5NjEsImlhdCI6MTU4NzU0ODE2MX0.3Kl-7sgAouQq4tu8Sv9do-AouyMw9gP87Foy5W-evuGl_mWFCZn8xgsbVPsydZJelLenD6DgrEYe4HdyeFfrZg"}|ERROR_CODE:

 

Now I want to take this value of token and call another rest service but this time i want to use the value of the token as a header parameter with name Authorization

 

How can I solve this, actually I am trying to use the tExtractJSONFields to extract the token value, but i do 0683p000009M9zk.pngnot know how to put this value into the next rest call

 

 

Labels (3)
2 Replies
manodwhb
Champion II
Champion II

@olja , tRestclinet you need to pass Body from the textractjsonfileds take the token filed and construct the Body filed in tJavarow, which Document data type. 

olja
Contributor
Contributor
Author

thx for the response, but can you please be more detailed, i cannot follow because i am new to talend. Maybe an example? How do I set this in the tJavaRow and how then push it to the next tRestClient call?

 

Thanks