net~ HttpHeaders

Support for HTTP headers.

Constructor

new HttpHeaders()

Extends

Members

(static, readonly) ACCEPT :string

The Accept header.

Type:
  • string

(static, readonly) AUTHORIZATION :string

The Authorization header.

Type:
  • string

(static, readonly) CONTENT_MD5 :string

The Content-MD5 header.

Type:
  • string

(static, readonly) CONTENT_TYPE :string

The Content-Type header.

Type:
  • string

(static, readonly) DATE :string

The Date header.

Type:
  • string

(static, readonly) DIGEST :string

The Digest header.

Type:
  • string

(static, readonly) HOST :string

The Host header.

Type:
  • string

(static, readonly) X_SN_DATE :string

The X-SN-Date header.

Type:
  • string

Methods

add(key, value) → {module:util~MutliMap}

Add a value.

This method will append values to existing keys.

Parameters:
NameTypeDescription
keystring

the key to use

value*

the value to add; if undefined nothing will be added

Returns:

this object

Type: 
module:util~MutliMap

clear() → {module:util~MutliMap}

Remove all properties from this map.

Returns:

this object

Type: 
module:util~MutliMap

containsKey(key) → {boolean}

Test if there are any values associated with a key.

Parameters:
NameTypeDescription
keystring

the key to test

Returns:

true if there is at least one value associated with the key

Type: 
boolean

firstValue(key) → {*}

Get the first avaialble value assocaited with a key.

Parameters:
NameTypeDescription
keystring

the key of the value to get

Returns:

the first available value associated with the key, or undefined if not available

Type: 
*

isEmpty() → {boolean}

Test if the map is empty.

Returns:

true if there are no entries in this map

Type: 
boolean

keySet() → {Array.<string>}

Get an array of all keys in this map.

Returns:

array of keys in this map, or an empty array if the map is empty

Type: 
Array.<string>

put(key, value) → {module:util~MutliMap}

Set a value.

This method will replace any existing values with just value.

Parameters:
NameTypeDescription
keystring

the key to use

value*

the value to set; if undefined nothing will be added

Returns:

this object

Type: 
module:util~MutliMap

putAll(values) → {module:util~MutliMap}

Set multiple values.

This method will replace any existing values with those provided on values.

Parameters:
NameTypeDescription
values*

an object who's enumerable properties will be added to this map

Returns:

this object

Type: 
module:util~MutliMap

remove(key) → {Array.<object>}

Remove all values associated with a key.

Parameters:
NameTypeDescription
keystring

the key of the values to remove

Returns:

the removed values, or undefined if no values were present for the given key

Type: 
Array.<object>

size() → {number}

Get the number of entries in this map.

Returns:

the number of entries in the map

Type: 
number

value(key) → {Array.<object>}

Get the values associated with a key.

Parameters:
NameTypeDescription
keystring

the key of the values to get

Returns:

the array of values associated with the key, or undefined if not available

Type: 
Array.<object>