Headers.has()
The has() method of the Headers interface
returns a boolean stating whether a Headers object contains a certain
header.
Syntax
has(name)
Parameters
name- : The name of the HTTP header you want to test for. If the given name is not a valid
HTTP header name, this method throws a
TypeError.
- : The name of the HTTP header you want to test for. If the given name is not a valid
HTTP header name, this method throws a
Return value
A boolean value.