Get Header Name Function
The get_header_name function gets the name of a header. It uses the following format:
get_header_name(index)
where:
index is a numeric value that identifies the header index. This index starts with 0 as the first value. To access the first header, you use an index value of 0. To access the second header, you use an index value of 1, and so forth.
For example, the following code gets the name of the first header:
var header = req.get_headers().get_header_name(0);