Calls a function for each header contained in the Headers object.
forEach(fn)
fn function(value, key, headers)
A function that accepts up to three arguments: value, key, and the headers object itself.
undefined
let headers = new Headers({ "content-type": "application/json", "accept-encoding": "gzip" })
headers.forEach((key, value) => {
print(`${key}: ${value}`)
})
content-type: application/json
accept-encoding: gzip