Class: HttpHeaders

net~ HttpHeaders

Support for HTTP headers.


new HttpHeaders()

Extends:

Extends

Members


<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)

Add a value.

This method will append values to existing keys.

Parameters:
Name Type Description
key string

the key to use

value *

the value to add

Inherited From:
Returns:

this object

Type
module:util~MutliMap

clear()

Remove all properties from this map.

Inherited From:
Returns:

this object

Type
module:util~MutliMap

containsKey(key)

Test if there are any values associated with a key.

Parameters:
Name Type Description
key string

the key to test

Inherited From:
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:
Name Type Description
key string

the key of the value to get

Inherited From:
Returns:

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

Type
*

isEmpty()

Test if the map is empty.

Inherited From:
Returns:

true if there are no entries in this map

Type
boolean

keySet()

Get an array of all keys in this map.

Inherited From:
Returns:

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

Type
Array.<string>

put(key, value)

Set a value.

This method will replace any existing values with just value.

Parameters:
Name Type Description
key string

the key to use

value *

the value to set

Inherited From:
Returns:

this object

Type
module:util~MutliMap

putAll(values)

Set multiple values.

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

Parameters:
Name Type Description
values *

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

Inherited From:
Returns:

this object

Type
module:util~MutliMap

remove(key)

Remove all values associated with a key.

Parameters:
Name Type Description
key string

the key of the values to remove

Inherited From:
Returns:

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

Type
Array.<object>

size()

Get the number of entries in this map.

Inherited From:
Returns:

the number of entries in the map

Type
number

value(key)

Get the values associated with a key.

Parameters:
Name Type Description
key string

the key of the values to get

Inherited From:
Returns:

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

Type
Array.<object>