Skip to main content
Version: 3.14.1

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.

Return value

A boolean value.