This modification is not needed. You can access job.Response.GetHeaders directly.
I'm using the j.Response.GetHeaders function to get my cookies from the response. That is working
However, I use the "set-cookie" header to grab the cookies in the response:
Dim headers As Map = j.Response.GetHeaders
Log("--------------------------------------------------")
For Each v As String In headers.Values
Log(v)
Next
Log("--------------------------------------------------")
Log(headers)
If(headers.IsInitialized) Then
If(headers.ContainsKey("set-cookie")) Then
newHTTPResponse.cookies = headers.Get("set-cookie")
Else
newHTTPResponse.cookies.Initialize
End If
End If
I tried logging all the values, and getting the value "set-cookie", but it only lets me have the last header called "set-cookie", which is the "TS015587bf" cookie:
Here is what I get from looping the values:
--------------------------------------------------
[no-cache, no-store]
[text/html; charset=utf-8]
[Sun, 08 Dec 2019 08:06:15 GMT]
[-1]
[no-cache]
[TS015587bf=01a28dbe2553f78ec3d7a5e52594ccb49e3c8877c92a23b064a189b4c60b2d672e55437003ab4c74aa88704dd7b417a4217ae3467b148bd3734fceb5b621867290a1680fba7e23d3760bd7a5bdfbac63eda4731dfedbacdc88297a818dc4038686b5fb923ea49d775e4a5f4e055243431cdf6bbdee; Path=/; Domain=.**]
[Accept-Encoding]
[SAMEORIGIN]
[IE=Edge]
--------------------------------------------------
Is it not showing duplicates header names?? It's only giving me the last header value with the name "set-cookie".
I know that the HTTPJob is storing more cookies than I am able to see. The server won't respond without the .AuthCookie, and the server is giving me everything I want. So it's getting sent.
Any advice on what might be happening?
Thank you!