Headers.prototype.delete

Deletes the header with the specified name.

Syntax

delete(name)

Parameters

Return value

undefined

Examples

let headers = new Headers({ "content-type": "application/json" })
print(headers.has('content-type'))
headers.delete('content-type')
print(headers.has('content-type'))
true
false