[PR #5896] [CLOSED] fix: allow body in GET requests #5404

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5896
Author: @themavik
Created: 2/20/2026
Status: Closed

Base: mainHead: fix/allow-body-in-get-requests


📝 Commits (2)

  • b665c0c fix: allow body in GET requests
  • 7356583 fix: address Copilot review - TypeScript narrowing and unit tests

📊 Changes

2 files changed (+184 additions, -0 deletions)

View changed files

📝 packages/hoppscotch-common/src/services/__tests__/kernel-interceptor.service.spec.ts (+170 -0)
📝 packages/hoppscotch-common/src/services/kernel-interceptor.service.ts (+14 -0)

📄 Description

Fixes #3974

GET requests now send the body when provided, matching the behavior shown in the generated cURL. When the browser interceptor is active and the request has a body with GET/HEAD, requests are routed through the proxy interceptor since browser XHR/fetch APIs strip bodies for these methods.


Summary by cubic

Allow sending bodies with GET requests. When the Browser interceptor is active, GET/HEAD with a body route through the Proxy interceptor so the body is preserved, matching the generated cURL; refactored execute() for strict TypeScript narrowing and added unit tests covering routing and non-routing cases.

Written for commit 735658397c. Summary will update on new commits.


🔄 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/5896 **Author:** [@themavik](https://github.com/themavik) **Created:** 2/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/allow-body-in-get-requests` --- ### 📝 Commits (2) - [`b665c0c`](https://github.com/hoppscotch/hoppscotch/commit/b665c0ca8c3eea52bbd16642a834aff90f9361ff) fix: allow body in GET requests - [`7356583`](https://github.com/hoppscotch/hoppscotch/commit/735658397c9717a8d1a1f8df1f7066d82b3ccf35) fix: address Copilot review - TypeScript narrowing and unit tests ### 📊 Changes **2 files changed** (+184 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/services/__tests__/kernel-interceptor.service.spec.ts` (+170 -0) 📝 `packages/hoppscotch-common/src/services/kernel-interceptor.service.ts` (+14 -0) </details> ### 📄 Description Fixes #3974 GET requests now send the body when provided, matching the behavior shown in the generated cURL. When the browser interceptor is active and the request has a body with GET/HEAD, requests are routed through the proxy interceptor since browser XHR/fetch APIs strip bodies for these methods. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Allow sending bodies with GET requests. When the Browser interceptor is active, GET/HEAD with a body route through the Proxy interceptor so the body is preserved, matching the generated cURL; refactored execute() for strict TypeScript narrowing and added unit tests covering routing and non-routing cases. <sup>Written for commit 735658397c9717a8d1a1f8df1f7066d82b3ccf35. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:51: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#5404
No description provided.