Headers.prototype.get

Returns the value of a specified HTTP header.

Syntax

get(name)

Parameters

Return value

The value of the specified HTTP header or undefined if the header does not exist.

Examples

let headers = new Headers({ "content-type": "application/json" })
headers.get('Content-Type')
"application/json"