Getting information from the request

I know there is a variable with the information from the httprequest (engineEnvironment).
However, I did some testing and I am unable to get the information from the headers of the httprequest.
Now I am particularly intereste in getting the “User-Agent” to see the browser the user is using, but I think other information can be valuable in the future.
Could you share some code snippet with the best way of getting this?
Thanks a lot in advance.


you can find the methods to read request headers here:

The methods getHeader​(), getHeaderNames() and getHeaders​() can be useful in this case. You can check with getHeaderNames() what headers are actually received by your Teneo engine.