Headers()
The Headers()
constructor creates a new Headers
object.
Syntax
new Headers()
new Headers(init)
Parameters
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 withString
values, an array of name-value pairs, where each pair is a 2-element string array; or an existingHeaders
object. In the last case, the newHeaders
object copies its data from the existingHeaders
object.
- : An object containing any HTTP headers that you want to pre-populate your