code: function setEnvironment (settings) {
    // Choose between inherited environment and new environment:
    if (typeof settings.options.env !== "object") {
      settings.options.env = process.env;
    }
  
    // Set environment variables for GET and POST requests
    // if 'inputData' is available:
    if (settings.inputData) {
      settings.options.env = setInputEnvironmentVariables(settings);
    }
  
    return settings.options.env;
  }
docs: Set script environment: