From 8ccbe562824d70ab02517622986e165c10c440ab Mon Sep 17 00:00:00 2001 From: John Date: Fri, 4 Oct 2019 21:19:45 -0700 Subject: [PATCH 1/2] Add quotation marks to XHR method, url --- pages/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index 508519e4f..bf7673aca 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -593,7 +593,7 @@ requestString.push('const xhr = new XMLHttpRequest()'); const user = this.auth === 'Basic' ? this.httpUser : null const pswd = this.auth === 'Basic' ? this.httpPassword : null - requestString.push('xhr.open(' + this.method + ', ' + this.url + this.path + this.queryString + ', true, ' + + requestString.push('xhr.open("' + this.method + '", "' + this.url + this.path + this.queryString + '", true, ' + user + ', ' + pswd + ')'); if (this.auth === 'Bearer Token') { requestString.push("xhr.setRequestHeader('Authorization', 'Bearer ' + " + this.bearerToken + ")"); From 87087c7eac8a883e5b43010ab7886e7b88ef9b16 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 4 Oct 2019 21:25:39 -0700 Subject: [PATCH 2/2] Add quotation marks to fetch url --- pages/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index bf7673aca..93f73f3f4 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -615,7 +615,7 @@ } else if (this.requestType == 'Fetch') { var requestString = []; var headers = []; - requestString.push('fetch(' + this.url + this.path + this.queryString + ', {\n') + requestString.push('fetch("' + this.url + this.path + this.queryString + '", {\n') requestString.push(' method: "' + this.method + '",\n') if (this.auth === 'Basic') { var basic = this.httpUser + ':' + this.httpPassword;