function addHeaders(rawHeaders, headers) {
	if (Array.isArray(rawHeaders)) {
		rawHeaders.forEach(function(header) {
			addTextHeader(header, headers);
		});
	} else if (typeof rawHeaders == 'string') {
		addTextHeader(rawHeaders, headers);
	} else if (typeof rawHeaders == 'object') {
		for (const key of Object.keys(rawHeaders)) {
			addHeader(key, rawHeaders[key], headers)
		}
	} else {
		console.error('Invalid header structure %j, it should be an array', rawHeaders);
	}
}
Add all raw headers given to the given array.