[PR #594] [MERGED] POST request body editor reacts to the content type #2733

Closed
opened 2026-03-17 00:24:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/594
Author: @AndrewBastin
Created: 2/24/2020
Status: Merged
Merged: 2/24/2020
Merged by: @AndrewBastin

Base: masterHead: feat/post-raw-type-handle


📝 Commits (2)

  • 5936a06 Added editorutils file with a utility function to convert mimetype to editor modes
  • fa339a5 Updated POST request body to react to the Content Type

📊 Changes

2 files changed (+16 additions, -1 deletions)

View changed files

functions/editorutils.js (+11 -0)
📝 pages/index.vue (+5 -1)

📄 Description

The Raw Request Body editor for POST requests is set to JSON mode and only provided the syntax highlighting mode for JSON. This PR intends to add the ability to for the user to update the syntax highlighting by updating the Content-Type.

So, for example, if the POST Content-Type is set to application/xml, the raw request editor updates the language mode to XML mode and if the request mode is set to application/json, it updates the mode to JSON Syntax Highlighting mode.


🔄 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/594 **Author:** [@AndrewBastin](https://github.com/AndrewBastin) **Created:** 2/24/2020 **Status:** ✅ Merged **Merged:** 2/24/2020 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `master` ← **Head:** `feat/post-raw-type-handle` --- ### 📝 Commits (2) - [`5936a06`](https://github.com/hoppscotch/hoppscotch/commit/5936a06ad18e31862af6991845233b557f11b5ae) Added editorutils file with a utility function to convert mimetype to editor modes - [`fa339a5`](https://github.com/hoppscotch/hoppscotch/commit/fa339a51837211d4d98a7e4875682db0071d4882) Updated POST request body to react to the Content Type ### 📊 Changes **2 files changed** (+16 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `functions/editorutils.js` (+11 -0) 📝 `pages/index.vue` (+5 -1) </details> ### 📄 Description The Raw Request Body editor for POST requests is set to JSON mode and only provided the syntax highlighting mode for JSON. This PR intends to add the ability to for the user to update the syntax highlighting by updating the Content-Type. So, for example, if the POST Content-Type is set to `application/xml`, the raw request editor updates the language mode to XML mode and if the request mode is set to `application/json`, it updates the mode to JSON Syntax Highlighting mode. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 00:24:40 +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#2733
No description provided.