FetchAPI багфикс отправки заголовков в нижнем регистре. FetсhAPI Headers lowercase bugfix.

async function fetch_fn(url, payload, authkey) {
	"use strict";
 
	const HOOK_String_toLowerCase = String.prototype.toLowerCase;
 
	String.prototype.toLowerCase = function() {
		return this;
	}
 
	const response = await fetch(url, {
		method: 'POST',
		headers: {
			'Authentication': authkey,
			'Request-Token': 'XT-' + Math.random().toString(16).substring(2),
			'Content-Type': 'application/json',
		},
		body: JSON.stringify(payload)
	});
 
	String.prototype.toLowerCase = HOOK_String_toLowerCase;
 
	return response;
}