HTTP headers for fetch / Request / Response (undici).

See also:

Constructor

Methods

append(name:String, value:String):Void

Appends a new value onto an existing header, or adds the header if it does not exist.

delete(name:String):Void

Deletes a header.

forEach(callback:(String, String, Headers) ‑> Void, ?thisArg:Any):Void

get(name:String):Null<String>

Returns the value of a header with the given name, or null if not present.

getSetCookie():Array<String>

Returns an array containing the values of all Set-Cookie headers.

has(name:String):Bool

Returns whether a header with the given name exists.

set(name:String, value:String):Void

Sets a new value for an existing header, or adds the header if it does not exist.