[GH-ISSUE #99] Content-Type revamping #45

Closed
opened 2026-03-16 12:57:35 +03:00 by kerem · 6 comments
Owner

Originally created by @nickpalenchar on GitHub (Aug 30, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/99

I wanted to start a discussion around the future of Content-Type and what direction everyone thinks we should go in. @NBTX mentioned a great idea in #63 which I'll requote:

I think we should make content-type a text field with 'command line completion' (autocomplete) for commonly used content types, rather than restricting to these two content types.

I personally love this idea. In addition to the auto-complete, a user could chose their own custom type, so that new types would not have to be manually implemented (#88).

But a related issue I see is that Content-Type is a header and nothing more. POST/PUT requests don't require a Content-Type header to succeed, odd as it would be to omit one. Within the context of postwoman UI you could technically have a Content-Type in the header section while the Content-Type dropdown was selected. It wouldn't be apparent to the user which one was actually set.

So I propose a few changes. First is to move the headers above the body, making the hierarchy Request > Headers > Request Body > Authentication > Parameters > Response > History. Second, remove the Content-Type dropdown and use it within the Headers section. Third, auto expand the Headers sections when requests types that expect Content-Type is selected--when this happens, Content-Type can pre-populate with application/json. The user is then free to modify that header or remove it entirely.

Open for discussion--when a conclusion is met I'll make a separate issue detailing the plan

Originally created by @nickpalenchar on GitHub (Aug 30, 2019). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/99 I wanted to start a discussion around the future of Content-Type and what direction everyone thinks we should go in. @NBTX mentioned a great idea in #63 which I'll requote: > I think we should make content-type a text field with 'command line completion' (autocomplete) for commonly used content types, rather than restricting to these two content types. I personally love this idea. In addition to the auto-complete, a user could chose their own custom type, so that new types would not have to be manually implemented (#88). But a related issue I see is that Content-Type is a **header** and nothing more. POST/PUT requests don't require a Content-Type header to succeed, odd as it would be to omit one. Within the context of postwoman UI you could technically have a Content-Type in the header section while the Content-Type dropdown was selected. It wouldn't be apparent to the user which one was actually set. So I propose a few changes. First is to move the headers above the body, making the hierarchy `Request > Headers > Request Body > Authentication > Parameters > Response > History`. Second, remove the Content-Type dropdown and use it within the Headers section. Third, auto expand the Headers sections when requests types that expect Content-Type is selected--when this happens, Content-Type can pre-populate with `application/json`. The user is then free to modify that header or remove it entirely. Open for discussion--when a conclusion is met I'll make a separate issue detailing the plan
kerem 2026-03-16 12:57:35 +03:00
Author
Owner

@nickpalenchar commented on GitHub (Aug 30, 2019):

Looks like no discussion needed so I'll be running with this!

<!-- gh-comment-id:526775790 --> @nickpalenchar commented on GitHub (Aug 30, 2019): Looks like no discussion needed so I'll be running with this!
Author
Owner

@liyasthomas commented on GitHub (Aug 30, 2019):

Revamped UI is under construction. Changes will reflect your suggestions ✌️

<!-- gh-comment-id:526776220 --> @liyasthomas commented on GitHub (Aug 30, 2019): Revamped UI is under construction. Changes will reflect your suggestions ✌️
Author
Owner

@NBTX commented on GitHub (Aug 31, 2019):

@nickpalenchar Just letting you know I'm working on autocomplete at the moment already.

<!-- gh-comment-id:526782064 --> @NBTX commented on GitHub (Aug 31, 2019): @nickpalenchar Just letting you know I'm working on autocomplete at the moment already.
Author
Owner

@nickpalenchar commented on GitHub (Aug 31, 2019):

Very nice, thanks for letting me know 👍

On Fri, Aug 30, 2019, at 8:07 PM, John Harker wrote:

@nickpalenchar https://github.com/nickpalenchar Just letting you know I'm working on autocomplete at the moment already.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/liyasthomas/postwoman/issues/99?email_source=notifications&email_token=ABZQYRJ3XH5EARHMCRQG7MLQHGY43A5CNFSM4ISIR6J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TA44A#issuecomment-526782064, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZQYRLKLWEGQRLQIC4HIH3QHGY43ANCNFSM4ISIR6JQ.

<!-- gh-comment-id:526798481 --> @nickpalenchar commented on GitHub (Aug 31, 2019): Very nice, thanks for letting me know 👍 On Fri, Aug 30, 2019, at 8:07 PM, John Harker wrote: > @nickpalenchar <https://github.com/nickpalenchar> Just letting you know I'm working on autocomplete at the moment already. > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub <https://github.com/liyasthomas/postwoman/issues/99?email_source=notifications&email_token=ABZQYRJ3XH5EARHMCRQG7MLQHGY43A5CNFSM4ISIR6J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TA44A#issuecomment-526782064>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABZQYRLKLWEGQRLQIC4HIH3QHGY43ANCNFSM4ISIR6JQ>.
Author
Owner

@michalsisak commented on GitHub (Nov 11, 2019):

Is this implemented? I can see some PR was merged, then reverted and merged again but I can't see any autosuggestions or completions in a header tab.

<!-- gh-comment-id:552427630 --> @michalsisak commented on GitHub (Nov 11, 2019): Is this implemented? I can see some PR was merged, then reverted and merged again but I can't see any autosuggestions or completions in a header tab.
Author
Owner

@liyasthomas commented on GitHub (Nov 11, 2019):

Content-Type for POST requests have been revamped with autosuggestions. Not for Headers. Headers can be added manually.

<!-- gh-comment-id:552428829 --> @liyasthomas commented on GitHub (Nov 11, 2019): Content-Type for `POST` requests have been revamped with autosuggestions. Not for Headers. Headers can be added manually.
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#45
No description provided.