[PR #270] [MERGED] Fix #269 Incorrect code generation #2530

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/270
Author: @reefqi037
Created: 11/6/2019
Status: Merged
Merged: 11/6/2019
Merged by: @liyasthomas

Base: masterHead: fix-code-generation


📝 Commits (2)

  • 177585c Fix #269 Incorrect code generation
  • 8398db9 Merge remote-tracking branch 'upstream/master' into fix-code-generation

📊 Changes

1 file changed (+22 additions, -17 deletions)

View changed files

📝 pages/index.vue (+22 -17)

📄 Description

XHR

  • Enclosed value of username, password, and headers properly with quotes
  • Set bearer token header as 'Bearer <token>'

xhr_basic_after
xhr_bearer_after

Fetch

  • Properly close final header value with quotes; "headerKey": "headerValue"
  • Properly close with authorization header with quotes;
    "Authorization": "Basic <value>",
    "Authorization": "Bearer <token>",
  • Set bearer token header as "Bearer <token>" (without the Token)
  • Properly enclose generated code

fetch_basic_after
fetch_bearer_after

cURL

  • Set bearer token header correctly; 'Bearer <value>' (without the Token)

curl_bearer_after


🔄 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/270 **Author:** [@reefqi037](https://github.com/reefqi037) **Created:** 11/6/2019 **Status:** ✅ Merged **Merged:** 11/6/2019 **Merged by:** [@liyasthomas](https://github.com/liyasthomas) **Base:** `master` ← **Head:** `fix-code-generation` --- ### 📝 Commits (2) - [`177585c`](https://github.com/hoppscotch/hoppscotch/commit/177585c99848030cee48444f66a869a7bd3c3df3) Fix #269 Incorrect code generation - [`8398db9`](https://github.com/hoppscotch/hoppscotch/commit/8398db90ef0a34e0d1d9587af2b37051c7e95be2) Merge remote-tracking branch 'upstream/master' into fix-code-generation ### 📊 Changes **1 file changed** (+22 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `pages/index.vue` (+22 -17) </details> ### 📄 Description **XHR** - Enclosed value of username, password, and headers properly with quotes - Set bearer token header as ```'Bearer <token>'``` ![xhr_basic_after](https://user-images.githubusercontent.com/44827833/68277218-141f5d80-00b2-11ea-8e1f-eeb2581bdf0f.PNG) ![xhr_bearer_after](https://user-images.githubusercontent.com/44827833/68277230-1a153e80-00b2-11ea-8497-2702a70805cd.PNG) --- **Fetch** - Properly close final header value with quotes; ```"headerKey": "headerValue"``` - Properly close with authorization header with quotes; ```"Authorization": "Basic <value>",``` ```"Authorization": "Bearer <token>",``` - Set bearer token header as ```"Bearer <token>"``` (without the Token) - Properly enclose generated code ![fetch_basic_after](https://user-images.githubusercontent.com/44827833/68277345-5779cc00-00b2-11ea-8fe2-3a02db14d728.PNG) ![fetch_bearer_after](https://user-images.githubusercontent.com/44827833/68277352-5b0d5300-00b2-11ea-8883-b7b894322d9c.PNG) --- **cURL** - Set bearer token header correctly; ```'Bearer <value>'``` (without the Token) ![curl_bearer_after](https://user-images.githubusercontent.com/44827833/68277437-8a23c480-00b2-11ea-950a-d9f2e444f1bb.PNG) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 00:13:29 +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#2530
No description provided.