Best way to get request header

Hello, guys

Browsing the internet, I’ve found few ways to get header value:

  1. txn.f:hdr(“x-forwarded-for”)
  2. txn.f:req_fhdr(“x-forwarded-for”)
  3. txn.http:req_get_headers()[“x-forwarded-for”][0]

Do you maybe know why there are so many ways and what the difference is? Which one is preferrable?