Functions
getHeader | I Returns the value of the specified header. |
getHeaders | I Gets all the header values to which the specified header key maps to. |
getHeader
function getHeader(ContentDistributionMessage msg, string headerName) returns string | HeaderNotFoundError
Isolated Function
Returns the value of the specified header. If the specified header key maps to multiple values, the first of these values is returned.
Parameters
- msg ContentDistributionMessage
Current websub:ContentDistributionMessage
object
- headerName string
The header name
Return Type
(string | HeaderNotFoundError)The first header value for the specified header name or the http:HeaderNotFoundError
if the header is not
found.
getHeaders
function getHeaders(ContentDistributionMessage msg, string headerName) returns string[ ] | HeaderNotFoundError
Isolated Function
Gets all the header values to which the specified header key maps to.
Parameters
- msg ContentDistributionMessage
Current websub:ContentDistributionMessage
object
- headerName string
The header name
Return Type
(string[ ] | HeaderNotFoundError)The header values the specified header key maps to or the http:HeaderNotFoundError
if the header is not
found.