From 8ae2b2dcb7acd67bd0d6c26df3e5914dadc9e829 Mon Sep 17 00:00:00 2001 From: Avior Date: Tue, 23 Jun 2020 00:10:03 +0200 Subject: [PATCH] Fix Cross-Origin Request Blocked --- Request.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Request.ts b/Request.ts index 484fb1d..be58528 100644 --- a/Request.ts +++ b/Request.ts @@ -35,7 +35,11 @@ export class Request { // Fetch Response try { - const resp = await fetch(this.url) + const resp = await fetch(this.url, { + headers: { + "Content-Type": "text/plain" + } + }) if (resp.status !== 200) { throw new Error(`Error request ended with the code (${resp.status})`) }