Web APIs

Headers.append()

Try the free JavaScript compiler

Appends a header value subject to the object guard. Ordinary combined header values can be read using get().

Formal Syntax & Structure

javascript syntaxjavascript
headers.append(name, value)

Parameters & Attributes

NameTypeDescription
namestringHeader name.
valuestringHeader value.

Return Value

undefined

No return value.

Working Example

Example Snippetjavascript
(async () => {const h=new Headers();h.append("X-Tag","a");h.append("X-Tag","b");console.log(h.get("x-tag"));})()
JavaScript Reference