JSHeader


A Header is a simple object containing only two properties. When read as a string it returns the full header line:

HeaderName: Some Header Value

It may also be assigned to as a string; in which case the name will be everything up to the first colon, and the value everything after that. The name and value are not checked for invalid characters (such as newlines) - that is the user's responsibility.

Properties

name

The header name.

value

The header value.

Example

// Set the header value
header.value = "New value";
// Set the entire header
header = "New-Name: New value";