[PR #2175] [MERGED] Supporting Raw Body Imports from Postman #3657

Closed
opened 2026-03-17 01:15:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/2175
Author: @RishabhAgarwal-2001
Created: 3/18/2022
Status: Merged
Merged: 3/25/2022
Merged by: @AndrewBastin

Base: mainHead: 2136-postman-import


📝 Commits (10+)

  • 23c677b feat: reorder key-value entries (#2189)
  • 770c3f1 refactor: revamped tab system
  • 1f2fb0f refactor: enable new tab component
  • 35571ff fix: tab switching side effect
  • 4764141 fix: tab deleting side effect
  • 0f8549c fix: tests
  • c620883 feat: body laguage options for importing from postman added
  • 4b8270e refactor: handle unknown raw language option
  • df3d15c refactor: restructure raw parse checking and valid content-type check for postman content-types
  • 51d2100 refactor: pm import body calculation and type corrections

📊 Changes

24 files changed (+1363 additions, -878 deletions)

View changed files

packages/hoppscotch-app/assets/icons/grip-vertical.svg (+18 -0)
📝 packages/hoppscotch-app/components/collections/ChooseType.vue (+10 -3)
📝 packages/hoppscotch-app/components/collections/index.vue (+3 -0)
📝 packages/hoppscotch-app/components/graphql/RequestOptions.vue (+97 -71)
📝 packages/hoppscotch-app/components/graphql/Sidebar.vue (+72 -77)
📝 packages/hoppscotch-app/components/http/BodyParameters.vue (+103 -81)
📝 packages/hoppscotch-app/components/http/Headers.vue (+86 -64)
📝 packages/hoppscotch-app/components/http/Parameters.vue (+83 -59)
📝 packages/hoppscotch-app/components/http/RequestOptions.vue (+6 -1)
📝 packages/hoppscotch-app/components/http/Sidebar.vue (+14 -7)
📝 packages/hoppscotch-app/components/http/URLEncodedParams.vue (+81 -59)
📝 packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue (+19 -2)
📝 packages/hoppscotch-app/components/realtime/Websocket.vue (+75 -50)
📝 packages/hoppscotch-app/components/smart/EnvInput.vue (+3 -0)
📝 packages/hoppscotch-app/components/smart/Tab.vue (+41 -23)
📝 packages/hoppscotch-app/components/smart/Tabs.vue (+93 -51)
📝 packages/hoppscotch-app/components/smart/__tests__/Tab.sample (+0 -0)
📝 packages/hoppscotch-app/helpers/import-export/import/postman.ts (+92 -36)
📝 packages/hoppscotch-app/package.json (+1 -0)
📝 packages/hoppscotch-app/pages/profile.vue (+6 -6)

...and 4 more files

📄 Description

Closes #2136

Problem Targeted

Users are unable to import postman requests containing raw body with no content-type header.

Description of Solution

Parse raw language options available in PM exported collection JSON to determine the content-type of raw body request.

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information


🔄 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/2175 **Author:** [@RishabhAgarwal-2001](https://github.com/RishabhAgarwal-2001) **Created:** 3/18/2022 **Status:** ✅ Merged **Merged:** 3/25/2022 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `main` ← **Head:** `2136-postman-import` --- ### 📝 Commits (10+) - [`23c677b`](https://github.com/hoppscotch/hoppscotch/commit/23c677b1277442d52d17f2698bb51be22d9ff818) feat: reorder key-value entries (#2189) - [`770c3f1`](https://github.com/hoppscotch/hoppscotch/commit/770c3f19e31ed17a91562238f62e104d72b632aa) refactor: revamped tab system - [`1f2fb0f`](https://github.com/hoppscotch/hoppscotch/commit/1f2fb0f9c35f51c2665059d2718ece4a14677f36) refactor: enable new tab component - [`35571ff`](https://github.com/hoppscotch/hoppscotch/commit/35571ffd095ef589dce8ae164e954b11673bb8bc) fix: tab switching side effect - [`4764141`](https://github.com/hoppscotch/hoppscotch/commit/476414115f97214b481160cded56dd270fda2131) fix: tab deleting side effect - [`0f8549c`](https://github.com/hoppscotch/hoppscotch/commit/0f8549cc24dbc591d1ac78d0a35d4d2499c129bd) fix: tests - [`c620883`](https://github.com/hoppscotch/hoppscotch/commit/c620883778f157f79cfb05b88b85ce1c716c7c0a) feat: body laguage options for importing from postman added - [`4b8270e`](https://github.com/hoppscotch/hoppscotch/commit/4b8270ede106dc3df9d3571a548274842ce8d193) refactor: handle unknown raw language option - [`df3d15c`](https://github.com/hoppscotch/hoppscotch/commit/df3d15c2c703c1b6b65b76bfffeaa7737137c166) refactor: restructure raw parse checking and valid content-type check for postman content-types - [`51d2100`](https://github.com/hoppscotch/hoppscotch/commit/51d2100bded778af56986302cf553edbe5b0dcfa) refactor: pm import body calculation and type corrections ### 📊 Changes **24 files changed** (+1363 additions, -878 deletions) <details> <summary>View changed files</summary> ➕ `packages/hoppscotch-app/assets/icons/grip-vertical.svg` (+18 -0) 📝 `packages/hoppscotch-app/components/collections/ChooseType.vue` (+10 -3) 📝 `packages/hoppscotch-app/components/collections/index.vue` (+3 -0) 📝 `packages/hoppscotch-app/components/graphql/RequestOptions.vue` (+97 -71) 📝 `packages/hoppscotch-app/components/graphql/Sidebar.vue` (+72 -77) 📝 `packages/hoppscotch-app/components/http/BodyParameters.vue` (+103 -81) 📝 `packages/hoppscotch-app/components/http/Headers.vue` (+86 -64) 📝 `packages/hoppscotch-app/components/http/Parameters.vue` (+83 -59) 📝 `packages/hoppscotch-app/components/http/RequestOptions.vue` (+6 -1) 📝 `packages/hoppscotch-app/components/http/Sidebar.vue` (+14 -7) 📝 `packages/hoppscotch-app/components/http/URLEncodedParams.vue` (+81 -59) 📝 `packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue` (+19 -2) 📝 `packages/hoppscotch-app/components/realtime/Websocket.vue` (+75 -50) 📝 `packages/hoppscotch-app/components/smart/EnvInput.vue` (+3 -0) 📝 `packages/hoppscotch-app/components/smart/Tab.vue` (+41 -23) 📝 `packages/hoppscotch-app/components/smart/Tabs.vue` (+93 -51) 📝 `packages/hoppscotch-app/components/smart/__tests__/Tab.sample` (+0 -0) 📝 `packages/hoppscotch-app/helpers/import-export/import/postman.ts` (+92 -36) 📝 `packages/hoppscotch-app/package.json` (+1 -0) 📝 `packages/hoppscotch-app/pages/profile.vue` (+6 -6) _...and 4 more files_ </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes #2136 ### Problem Targeted Users are unable to import postman requests containing raw body with no content-type header. ### Description of Solution Parse raw language options available in PM exported collection JSON to determine the content-type of raw body request. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behavior, etc. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:15:13 +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#3657
No description provided.