From 1f38c25e6a70a0541ae048885de3d8363dc71620 Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Tue, 17 Mar 2020 10:53:36 -0300 Subject: [PATCH] fix(req-body): enable parameters list for form encoded only disable raw input toggle when not content type 'application/x-www-form-urlencoded' --- pages/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index 63dad1bb1..2af4958e2 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -223,7 +223,7 @@
  • - + {{ $t("raw_input") }} @@ -1432,8 +1432,8 @@ export default { ]) }, }, - contentType(val) { - this.rawInput = !this.knownContentTypes.includes(val) + canListParameters(canToggleRaw) { + this.rawInput = !canToggleRaw }, rawInput(status) { if (status && this.rawParams === "") { @@ -1532,6 +1532,9 @@ export default { "text/html", "text/plain", ], + canListParameters() { + return this.contentType === "application/x-www-form-urlencoded" + }, uri: { get() { return this.$store.state.request.uri ? this.$store.state.request.uri : this.url + this.path