[GH-ISSUE #4863] [feature]: Set Headers in Authorization OAuth 2.0 #1832

Open
opened 2026-03-16 21:59:40 +03:00 by kerem · 1 comment
Owner

Originally created by @Anti-Sh on GitHub (Mar 10, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4863

Is there an existing issue for this?

  • I have searched the existing issues

Summary

Header management in the OAuth 2 authorization settings.

Why should this be worked on?

In some instances, it is necessary to specify a particular Content-Type. In my case, this would be "application/x-www-form-urlencoded". However, at present, this is not possible. As a result, the values contained in the Body are not being passed to the authorization handler.

Originally created by @Anti-Sh on GitHub (Mar 10, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4863 ### Is there an existing issue for this? - [x] I have searched the existing issues ### Summary Header management in the OAuth 2 authorization settings. ### Why should this be worked on? In some instances, it is necessary to specify a particular Content-Type. In my case, this would be "application/x-www-form-urlencoded". However, at present, this is not possible. As a result, the values contained in the Body are not being passed to the authorization handler.
Author
Owner

@sajjad6ansari commented on GitHub (Apr 6, 2025):

Hi @Anti-Sh and the Hoppscotch team ,

I'm encountering a similar issue with header management, but it seems to be more general than just the OAuth 2 authorization settings.

I've noticed that when I create a regular HTTP request (outside of the OAuth 2 flow) and select "JSON" as the body type, the Content-Type: application/json header is not automatically added to the request headers. I have to manually add it in the "Headers" section for the server to correctly interpret the JSON body.

This behavior is unexpected, as most HTTP clients automatically set the Content-Type header based on the selected body type. It appears the issue might be with the automatic header management across different parts of Hoppscotch, not just within the OAuth 2 configuration.

Could this issue be broadened to address the automatic setting of Content-Type headers for various body types (like JSON, form-data, etc.) in the main request builder as well?

Also, I think this is bug instead of feature.
Thanks for looking into this!

<!-- gh-comment-id:2781473136 --> @sajjad6ansari commented on GitHub (Apr 6, 2025): Hi @Anti-Sh and the Hoppscotch team , I'm encountering a similar issue with header management, but it seems to be more general than just the OAuth 2 authorization settings. I've noticed that when I create a regular HTTP request (outside of the OAuth 2 flow) and select "JSON" as the body type, the `Content-Type: application/json` header is **not** automatically added to the request headers. I have to manually add it in the "Headers" section for the server to correctly interpret the JSON body. This behavior is unexpected, as most HTTP clients automatically set the `Content-Type` header based on the selected body type. It appears the issue might be with the automatic header management across different parts of Hoppscotch, not just within the OAuth 2 configuration. Could this issue be broadened to address the automatic setting of `Content-Type` headers for various body types (like JSON, form-data, etc.) in the main request builder as well? Also, I think this is bug instead of feature. Thanks for looking into this!
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#1832
No description provided.