function getHeadersToSend (url) {
	const headersToSend = { "User-Agent": `Mozilla/5.0 MagicMirror/${global.version}` };
	const headersToSendMatch = new RegExp("sendheaders=(.+?)(&|$)", "g").exec(url);
	if (headersToSendMatch) {
		const headers = headersToSendMatch[1].split(",");
		for (const header of headers) {
			const keyValue = header.split(":");
			if (keyValue.length !== 2) {
				throw new Error(`Invalid format for header ${header}`);
			}
			headersToSend[keyValue[0]] = decodeURIComponent(keyValue[1]);
		}
	}
	return headersToSend;
}
Gets headers and values to attach to the web request.
@param {string} url - The url containing the headers and values to send.
@returns {object} An object specifying name and value of the headers.