Skip to main content
Version: 1.8.0


The Headers() constructor creates a new Headers object.


new Headers()
new Headers(init)


  • init optional
    • : An object containing any HTTP headers that you want to pre-populate your Headers object with. This can be a simple object literal with String values, an array of name-value pairs, where each pair is a 2-element string array; or an existing Headers object. In the last case, the new Headers object copies its data from the existing Headers object.