[PR #4963] [MERGED] feat: import authorization header with curl #5001

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4963
Author: @chhaviG22
Created: 4/7/2025
Status: Merged
Merged: 5/8/2025
Merged by: @jamesgeorge007

Base: patchHead: feature/authorization-header-import


📝 Commits (5)

  • 8a3d1c9 feat: import authorization header with curl
  • be3be92 feat: fixed test cases
  • c7a9c59 Merge branch 'main' into feature/authorization-header-import
  • e49e0a3 feat: fixed test cases
  • 0248cb5 Merge branch 'main' into feature/authorization-header-import

📊 Changes

2 files changed (+32 additions, -7 deletions)

View changed files

📝 packages/hoppscotch-common/src/helpers/curl/__tests__/curlparser.spec.js (+31 -3)
📝 packages/hoppscotch-common/src/helpers/curl/sub_helpers/headers.ts (+1 -4)

📄 Description

This pull request updates the logic used to filter headers when a curl command is imported into Hoppscotch. Previously, the "Authorization" header along with certain "Content-Type" headers were intentionally excluded. This update retains the "Authorization" header, enhancing the tool's ability to handle secure requests seamlessly by including all critical headers necessary for authentication.

What's changed

  • Header Filtering Logic: Modified the header filter logic to not exclude the "Authorization" header during the import of curl commands.

Notes to reviewers

  • This update is crucial for users importing curl commands that rely on the Authorization header for API requests.

🔄 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/4963 **Author:** [@chhaviG22](https://github.com/chhaviG22) **Created:** 4/7/2025 **Status:** ✅ Merged **Merged:** 5/8/2025 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `patch` ← **Head:** `feature/authorization-header-import` --- ### 📝 Commits (5) - [`8a3d1c9`](https://github.com/hoppscotch/hoppscotch/commit/8a3d1c96160fad3ad0d73ee9ba0b3b78192472f8) feat: import authorization header with curl - [`be3be92`](https://github.com/hoppscotch/hoppscotch/commit/be3be9281a322ad6f4f9b2e4e819c646fb69b7f0) feat: fixed test cases - [`c7a9c59`](https://github.com/hoppscotch/hoppscotch/commit/c7a9c59e6d669e816c4f5c3b83ffaeee28ff0262) Merge branch 'main' into feature/authorization-header-import - [`e49e0a3`](https://github.com/hoppscotch/hoppscotch/commit/e49e0a354117365964f58e3228634fa370b948ab) feat: fixed test cases - [`0248cb5`](https://github.com/hoppscotch/hoppscotch/commit/0248cb5d612ec5b15d64e8d0f96a91e781535150) Merge branch 'main' into feature/authorization-header-import ### 📊 Changes **2 files changed** (+32 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/helpers/curl/__tests__/curlparser.spec.js` (+31 -3) 📝 `packages/hoppscotch-common/src/helpers/curl/sub_helpers/headers.ts` (+1 -4) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (feature, in this case) 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 # --> <!-- No issue pre-existed --> <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> This pull request updates the logic used to filter headers when a curl command is imported into Hoppscotch. Previously, the "Authorization" header along with certain "Content-Type" headers were intentionally excluded. This update retains the "Authorization" header, enhancing the tool's ability to handle secure requests seamlessly by including all critical headers necessary for authentication. ### What's changed <!-- Describe point by point the different things you have changed in this PR --> - **Header Filtering Logic**: Modified the header filter logic to not exclude the "Authorization" header during the import of curl commands. ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> - This update is crucial for users importing curl commands that rely on the Authorization header for API requests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:29:28 +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#5001
No description provided.