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.

Hi,

you can find the methods to read request headers here:

https://www.teneo.ai/documentation/6.2.1/javadoc/engine-scripting-api/com/artisol/teneo/engine/webapp/HttpEngineEnvironment.html

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.

Alexander