code: function headersToString(headers) {
    let ret = [];
    headers.forEach(function(value, name) {
      ret.push(`${name.toLowerCase()}: ${value}`);
    });
    return ret.join('\n');
  }
docs: Converts a headers map to a HTTP header block string.
  @param {!Map<string, string>} headers The map to convert.
  @return {string} The headers as a string.