[PR #2088] [MERGED] fix: parsing of protocol correctly #3621

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/2088
Author: @kyteinsky
Created: 1/25/2022
Status: Merged
Merged: 2/22/2022
Merged by: @AndrewBastin

Base: mainHead: fix/parse-curl-protocol


📝 Commits (10+)

  • edbe8b3 fix: parsing of protocol correctly
  • 5b3a429 Merge branch 'main' into fix/parse-curl-protocol
  • 5a82fd1 fix: leave params with no value in the url
  • 647e03d fix: accept basic auth creds with --user arg
  • 637c23c fix: settle type issue
  • 2f5311a fix: various bug fixes and content type detection
  • fac1e24 fix: code style changes and fp-ts methods used
  • 0f23e1b fix: curl parser code cleaning
  • 49c01f2 feat: add named tracing to functional methods
  • 9d9a0a5 refactor: convert code to functional nature and bug fixes

📊 Changes

7 files changed (+994 additions, -329 deletions)

View changed files

📝 packages/hoppscotch-app/components/http/ImportCurl.vue (+3 -65)
packages/hoppscotch-app/helpers/curl/contentParser.ts (+274 -0)
packages/hoppscotch-app/helpers/curl/curlparser.ts (+666 -0)
packages/hoppscotch-app/helpers/curl/index.ts (+29 -0)
packages/hoppscotch-app/helpers/curlparser.ts (+0 -264)
📝 packages/hoppscotch-app/helpers/functional/debug.ts (+13 -0)
packages/hoppscotch-app/helpers/functional/json.ts (+9 -0)

📄 Description

Closes #2066

Description

Domain with no protocol supplied was not parsed correctly and resulted in null. This issue has been fixed in this commit. Moreover, params with no values now do not carry double quotes in the key section and are placed at the end of the URL itself instead of the parameters section. Basic auth (username and password) has been added.

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

🔄 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/2088 **Author:** [@kyteinsky](https://github.com/kyteinsky) **Created:** 1/25/2022 **Status:** ✅ Merged **Merged:** 2/22/2022 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `main` ← **Head:** `fix/parse-curl-protocol` --- ### 📝 Commits (10+) - [`edbe8b3`](https://github.com/hoppscotch/hoppscotch/commit/edbe8b39c51d45bf8cd6a487741e91fcbd3638f2) fix: parsing of protocol correctly - [`5b3a429`](https://github.com/hoppscotch/hoppscotch/commit/5b3a429f696181541ca6bbd9416d3c0ffd00a81a) Merge branch 'main' into fix/parse-curl-protocol - [`5a82fd1`](https://github.com/hoppscotch/hoppscotch/commit/5a82fd106990ce8ce778947852e93d9bb6df29af) fix: leave params with no value in the url - [`647e03d`](https://github.com/hoppscotch/hoppscotch/commit/647e03dd135e8baac18d2aad335291538a87eafc) fix: accept basic auth creds with --user arg - [`637c23c`](https://github.com/hoppscotch/hoppscotch/commit/637c23cb1adfb2481239abd0862acadbe407b98b) fix: settle type issue - [`2f5311a`](https://github.com/hoppscotch/hoppscotch/commit/2f5311a0d7164b738990361aa25f573f0b331040) fix: various bug fixes and content type detection - [`fac1e24`](https://github.com/hoppscotch/hoppscotch/commit/fac1e2417f40b93cf5d5cdda4848246a3989d752) fix: code style changes and fp-ts methods used - [`0f23e1b`](https://github.com/hoppscotch/hoppscotch/commit/0f23e1bebf5a2b96064a0b9033753825fa7aec7b) fix: curl parser code cleaning - [`49c01f2`](https://github.com/hoppscotch/hoppscotch/commit/49c01f2de3523450abf24e84910e61aa881b1b1d) feat: add named tracing to functional methods - [`9d9a0a5`](https://github.com/hoppscotch/hoppscotch/commit/9d9a0a52c1d65a2b14f84411094863a034f03ead) refactor: convert code to functional nature and bug fixes ### 📊 Changes **7 files changed** (+994 additions, -329 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-app/components/http/ImportCurl.vue` (+3 -65) ➕ `packages/hoppscotch-app/helpers/curl/contentParser.ts` (+274 -0) ➕ `packages/hoppscotch-app/helpers/curl/curlparser.ts` (+666 -0) ➕ `packages/hoppscotch-app/helpers/curl/index.ts` (+29 -0) ➖ `packages/hoppscotch-app/helpers/curlparser.ts` (+0 -264) 📝 `packages/hoppscotch-app/helpers/functional/debug.ts` (+13 -0) ➕ `packages/hoppscotch-app/helpers/functional/json.ts` (+9 -0) </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 #2066 ### Description <!-- Add a brief description of the pull request --> Domain with no protocol supplied was not parsed correctly and resulted in null. This issue has been fixed in this commit. Moreover, params with no values now do not carry double quotes in the key section and are placed at the end of the URL itself instead of the parameters section. Basic auth (username and password) has been added. <!-- 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 - [ ] All the tests have passed <!-- 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:13:18 +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#3621
No description provided.