[PR #693] [MERGED] Fix raw input (JSON) #2797

Closed
opened 2026-03-17 00:28:23 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/693
Author: @leomp12
Created: 3/20/2020
Status: Merged
Merged: 3/22/2020
Merged by: @liyasthomas

Base: masterHead: fix/raw-input


📝 Commits (9)

  • 86ee80f Merge pull request #2 from liyasthomas/master
  • dc771f5 fix(req-body): ensure raw input if !canListParameters
  • 9a4e64e fix: fix canListParameter (undefined) to canListParameters
  • c370ee8 fix: canListParameters prop must return
  • 90bd8d4 style(js): minor code style fix
  • 76786f7 fix(raw-input): allow list parameters for json, set true when raw params is changed
  • 3f9ae7f fix(raw-input): allow list parameter for any content type ending with 'json'
  • 2a8ba00 Merge branch 'master' into fix/raw-input
  • ed4f1fe Update index.vue

📊 Changes

1 file changed (+20 additions, -14 deletions)

View changed files

📝 pages/index.vue (+20 -14)

📄 Description

Related issue: https://github.com/liyasthomas/postwoman/issues/597

As I've commented on commit github.com/liyasthomas/postwoman@b14adc29f5, the problem with JSON body and raw input is happening again after this commit, maybe I've named things badly (canListParameters) and you misunderstood me, so I'm suggesting another fix 😛

I've realized that it's getting rawInput original state from Vuex, and then it could happen to have JSON content with raw input disabled and without the toggle component, this way it would not be possible to enable raw input at all...

Now I'm making sure rawInput is true always canListParameters is false, and kept (revert) canListParameters to be true only with application/x-www-form-urlencoded.

With immediate canListParameters wacther, https://github.com/liyasthomas/postwoman/compare/master...leomp12:fix/raw-input?expand=1#diff-b19fa22add3de9cd0b98b05366479d92R1767 may be unnecessary, just to be really sure


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/693 **Author:** [@leomp12](https://github.com/leomp12) **Created:** 3/20/2020 **Status:** ✅ Merged **Merged:** 3/22/2020 **Merged by:** [@liyasthomas](https://github.com/liyasthomas) **Base:** `master` ← **Head:** `fix/raw-input` --- ### 📝 Commits (9) - [`86ee80f`](https://github.com/hoppscotch/hoppscotch/commit/86ee80f6071874fef68f352245abfc89a0f16b22) Merge pull request #2 from liyasthomas/master - [`dc771f5`](https://github.com/hoppscotch/hoppscotch/commit/dc771f51e8364df675bf7859fc8a344fc149408b) fix(req-body): ensure raw input if `!canListParameters` - [`9a4e64e`](https://github.com/hoppscotch/hoppscotch/commit/9a4e64e13f5c0f23bc5b631988c0609700fb3513) fix: fix `canListParameter` (undefined) to `canListParameters` - [`c370ee8`](https://github.com/hoppscotch/hoppscotch/commit/c370ee8018b0fe0f0c3da15b2d357e659d9efbb4) fix: `canListParameters` prop must return - [`90bd8d4`](https://github.com/hoppscotch/hoppscotch/commit/90bd8d45b4bc38680ee076030076a606a5b637a1) style(js): minor code style fix - [`76786f7`](https://github.com/hoppscotch/hoppscotch/commit/76786f7a0187e1509489dc1010e1776fe06b300b) fix(raw-input): allow list parameters for json, set true when raw params is changed - [`3f9ae7f`](https://github.com/hoppscotch/hoppscotch/commit/3f9ae7fecc9ec98a2c66dfd01f59b6859a6d3e52) fix(raw-input): allow list parameter for any content type ending with 'json' - [`2a8ba00`](https://github.com/hoppscotch/hoppscotch/commit/2a8ba00024e25097f8d2c6b30df08c5f420b8872) Merge branch 'master' into fix/raw-input - [`ed4f1fe`](https://github.com/hoppscotch/hoppscotch/commit/ed4f1fe6f86381c984154da24dc23556156fa387) Update index.vue ### 📊 Changes **1 file changed** (+20 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `pages/index.vue` (+20 -14) </details> ### 📄 Description Related issue: https://github.com/liyasthomas/postwoman/issues/597 As I've commented on commit https://github.com/liyasthomas/postwoman/commit/b14adc29f521271306970e896c45ffe46ee04848, the problem with JSON body and raw input is happening again after this commit, maybe I've named things badly (`canListParameters`) and you misunderstood me, so I'm suggesting another fix :stuck_out_tongue: I've realized that it's getting `rawInput` original state from Vuex, and then it could happen to have JSON content with raw input disabled and without the toggle component, this way it would not be possible to enable raw input at all... Now I'm making sure `rawInput` is true always `canListParameters` is false, and kept (revert) `canListParameters` to be true only with `application/x-www-form-urlencoded`. > With immediate `canListParameters` wacther, https://github.com/liyasthomas/postwoman/compare/master...leomp12:fix/raw-input?expand=1#diff-b19fa22add3de9cd0b98b05366479d92R1767 may be unnecessary, just to be really sure --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 00:28:23 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2797
No description provided.