From ca131697b63ae802664f65025f1c73b6df2d1f53 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Fri, 31 Dec 2021 15:28:47 +0530 Subject: [PATCH] refactor: headers system to respect data model --- .../components/http/Headers.vue | 216 +++++++++++------- .../hoppscotch-app/newstore/RESTSession.ts | 2 +- 2 files changed, 139 insertions(+), 79 deletions(-) diff --git a/packages/hoppscotch-app/components/http/Headers.vue b/packages/hoppscotch-app/components/http/Headers.vue index 2d2cd9e5d..4ce0ac799 100644 --- a/packages/hoppscotch-app/components/http/Headers.vue +++ b/packages/hoppscotch-app/components/http/Headers.vue @@ -39,7 +39,7 @@
@@ -106,9 +106,7 @@ updateHeader(index, { key: header.key, value: header.value, - active: header.hasOwnProperty('active') - ? !header.active - : false, + active: !header.active, }) " /> @@ -124,8 +122,8 @@
diff --git a/packages/hoppscotch-app/newstore/RESTSession.ts b/packages/hoppscotch-app/newstore/RESTSession.ts index 53aa87cb7..d5fce8140 100644 --- a/packages/hoppscotch-app/newstore/RESTSession.ts +++ b/packages/hoppscotch-app/newstore/RESTSession.ts @@ -28,7 +28,7 @@ export const defaultRESTRequest: HoppRESTRequest = { endpoint: "https://echo.hoppscotch.io", name: "Untitled request", params: [{ key: "", value: "", active: true }], - headers: [{ key: "", value: "", active: true }], + headers: [], method: "GET", auth: { authType: "none",