Headers.prototype.keys

Returns an iterator for all keys contained in the Headers object.

Syntax

keys()

Return value

An iterator.

Examples

let headers = new Headers({ "content-type": "application/json", "accept-encoding": "gzip" })
for (let key of headers.keys()) {
  print(key)
}
content-type
accept-encoding