I'm not really familiar with XMLHttpRequest but this is what I would do with fetch:
fetch ("/qresearch/threads.json", { headers: { referer: "https://8kun.top/" }});
I'm not sure if the browser even permits that. I mean it should since the page is in the "8kun.top" domain but I haven't tried it.