new ParsedHeaderValue()
Methods
isMatchedBy(matchTry) → {boolean}
Test if this header is matched by matchTry header
Parameters:
Name | Type | Description |
---|---|---|
matchTry |
ParsedHeaderValue | The header to be matched from |
Returns:
true if this header represents a subset of matchTry, otherwise, false
- Type
- boolean
isPermitted() → {boolean}
Is this an allowed operation as specified by the corresponding header?
Returns:
- Type
- boolean
parameter(key) → {string}
The value of the parameter specified by this key. Each is one of 3 things:
- null <- That key was not specified
- ParsedHeaderValue.EMPTY (tested using ==) <- The value was not specified
- [Other] <- The value of the parameter
q
parameter is never present.
Parameters:
Name | Type | Description |
---|---|---|
key |
string |
Returns:
- Type
- string
parameters() → {Array.<string>}
The parameters specified in this header value.
Note: The
q
parameter is never present.
Returns:
Unmodifiable Map of parameters of this header value
- Type
- Array.<string>
rawValue() → {string}
Contains the raw value that was received from the user agent
Returns:
- Type
- string
value() → {string}
Holds the unparsed value of the header.
For the most part, this is the content before the semi-colon (";")
For the most part, this is the content before the semi-colon (";")
Returns:
- Type
- string
weight() → {number}
Holds the weight specified in the "q" parameter of the header.
If the parameter is not specified, 1.0 is assumed according to rfc7231
If the parameter is not specified, 1.0 is assumed according to rfc7231
Returns:
- Type
- number
weightedOrder() → {number}
An integer that represents the absolute order position of this header
Returns:
- Type
- number