GetHeader(name) Last updated: 15. May 2024
API only function
Reads a header value from the request.
Parameters
Name | Type | Description |
---|---|---|
name | string | The name of the header to read. |
Returns
The value of the header. It may be an array if there are multiple header values.
Example
Code example (JS)
JS is normal JavaScript either running in the browser or on the Docly™ server.// Retrieve the 'If-Modified-Since' header from the request
let ifModifiedSinceHeader = docly.getHeader("If-Modified-Since");
// Write value to output
write(ifModifiedSinceHeader);