Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.