docs: function checkHeaders(expected, actual, matchingRules){
      if(!expected){
          return;
      }
      //V1 Simple matching
      if(!matchingRules){
          // Make header key casing insensitive
          var lcExpected = stripHeaderWhitespace(makeObjectKeysLC(expected));
          var lcActual = stripHeaderWhitespace(makeObjectKeysLC(actual));
  
          //Check all required headers are present:
          var expectedKeys = Object.keys(lcExpected);
          var failures = expectedKeys.map(function(k){
              if(lcExpected[k] !== lcActual[k]){
                  return {
                      error: "Headers do not match expectation:",
                      expected: expected,
                      actual: actual
                  };
              }
          });
  
          if(failures.length){
              return failures[0];
          }
      }
      else { //V2 Regex and more complex rule matching
          var paths = Object.keys(matchingRules);
          var failures = paths.map(function(path){
              return v2Ruleset(path, matchingRules[path], actual, expected);
          });
          if(failures.length){
              return failures[0];
          }
      }
  }