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

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

Retrieve Response Header data by making an unauthorized HTTP GET request

Hi All,

 

I have a requirement in which I have to make an unauthorized (401 Unauthorized) HTTP GET request without any parameters in order to retrieve the value of nonce in www-aunthenticate response header. I am using Talend Open Studio Version 6.2.1. I am new to this tool. Hence, I do not know how I can achieve the above.

 

I have tried tRestClient, but it threw the 401 Unauthorized error. I tried tRest component, but it has no built-in Header variable unlike tRestClient. I think both components expect either query parameters or headers. I require the response headers by using only the URL without passing any parameters/headers.

 

I need your help in finding a solution.

 

Thank you.

 

Labels (4)
2 Replies
Anonymous
Not applicable

Have you tried using this globalMap value.....

((java.util.Map<String,java.util.List<String>>)globalMap.get("tRESTClient_1_HEADERS"))

You will require some basic Java in order to iterate over the values, but this is where you would get your headers.

deepsie
Contributor
Contributor
Author

Yes. I have tried that. Like I mentioned, I get the 401 unauthorized error. 

 

I wrote a java code to make the unauthorized request and get the required header value.

 

Thank you.