From eb69ddfef9620613eaf53358bd53a9b2c1add5a5 Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Fri, 23 Aug 2019 16:03:39 +0530 Subject: [PATCH] :sparkles: Better error messages, updated sample test API --- index.html | 2 +- script.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index a80741da..393b90a1 100644 --- a/index.html +++ b/index.html @@ -224,7 +224,7 @@ diff --git a/script.js b/script.js index ef565bf3..9b7886b9 100644 --- a/script.js +++ b/script.js @@ -13,9 +13,9 @@ const app = new Vue({ el: '#app', data: { method: 'GET', - url: 'https://yesno.wtf', + url: 'https://reqres.in', auth: 'None', - path: '/api', + path: '/api/users', httpUser: '', httpPassword: '', bearerToken: '', @@ -151,8 +151,8 @@ const app = new Vue({ } } xhr.onerror = e => { - this.response.status = '0' - this.response.body = 'Error ;(' + this.response.status = xhr.status + this.response.body = xhr.statusText } }, addRequestParam() {