We need to retrieve the response headers from an HTTP GET call issued in SSJS with the Script.Util.HttpRequest function.
Unfortunately, even though it seems straightforward and the task itself is pretty trivial, we cannot get our head around it.
We already read the answer by (the great) Gortonington to this very recent thread, but event though it shed some light, it does not solve our problem.
We understand that header are returned as CLR objects, but evidently we are doing something wrong.
Below is the (one of the many) snippet of code that clarifies what we are trying to achieve:
Inside the try block there are some attempts to print the "server" header (we also tried "Server", "location" and others). The first Stringify returns an empty object. The other two attempts return: "Use of Common Language Runtime (CLR) is not allowed".
Can anyone help us on this matter? Thanks in advance.