@taurgis/sfccdx
Version:
SFCCDX is a command line interface (CLI) for Salesforce Commerce Cloud. It can be used to easily manage (meta)data (import/export) in relation to your project.
17 lines (16 loc) • 694 B
JavaScript
/**
* @function addGenericHeader
* @description Adds a generic header to the current request
*
* @param {Object} thisRequest Represents the current request being processed
* @param {String} headerId Represents the identifier representing the header being added
* @param {String} headerValue Represents the value being added to the header
* @returns {Object} Returns the request with the generic header being added
*/
module.exports = (thisRequest, headerId, headerValue) => {
// Set the generic header
// eslint-disable-next-line no-param-reassign
thisRequest.headers[headerId] = headerValue;
// Return the request -- with the header appended
return thisRequest;
};