RequestResponse.getRequestHeader()

Get the value of the specified request header from the current HTTP/vHTTP request.

Usage

Hover over inputs/exits for more info.

var RequestResponse = require('machinepack-reqres');


// Get the value of the specified request header from the current HTTP/vHTTP request.

RequestResponse.getRequestHeader({

header: 'accept',

}).execSync();

Inputs

header required

The name of the request header to look up.

'accept'

Exits

error

An unexpected error occurred.

success

OK.

'text/javascript'