---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# Headers.has()

The **`has()`** method of the `Headers` interface
returns a boolean stating whether a `Headers` object contains a certain
header.

## Syntax

```js
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.
