From dc771f51e8364df675bf7859fc8a344fc149408b Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Fri, 20 Mar 2020 15:40:04 -0300 Subject: [PATCH] fix(req-body): ensure raw input if `!canListParameters` --- pages/index.vue | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index c3bdee4b0..35a01acaf 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1432,8 +1432,11 @@ export default { ]) }, }, - canListParameters(canToggleRaw) { - this.rawInput = !canToggleRaw + canListParameters: { + immediate: true, + handler (canToggleRaw) { + this.rawInput = !canToggleRaw + } }, contentType(contentType, oldContentType) { const getDefaultParams = contentType => { @@ -1544,11 +1547,7 @@ export default { "text/plain", ], canListParameters() { - return [ - "application/json", - "application/hal+json", - "application/x-www-form-urlencoded", - ].includes(this.contentType) + this.contentType === "application/x-www-form-urlencoded" }, uri: { get() { @@ -1765,7 +1764,7 @@ export default { }, rawInput: { get() { - return this.$store.state.request.rawInput + return this.canListParameter ? this.$store.state.request.rawInput : true }, set(value) { this.$store.commit("setState", { value, attribute: "rawInput" })