[GH-ISSUE #4660] [bug]: Content-type not being set in Windows App #1728

Closed
opened 2026-03-16 21:32:39 +03:00 by kerem · 6 comments
Owner

Originally created by @clibu on GitHub (Jan 6, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4660

Originally assigned to: @CuriousCorrelation on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Rest - POST with body set to application/json isn't setting 'Content-Type: ' to application/json

Steps to reproduce

I'm using Rest - POST and have body set to application/json and I've set a raw JSON object.

The server is getting an empty body object {}. And the generated code is:

curl --request POST \
  --url http://localhost:8100/users \
  --header 'Content-Type: ' \
  --data '{
  "event": "subscriber",
  "email": "mel.smith@gmail.com"
}'

ie. 'Content-Type: ' is not set to 'application/josn'

Hoppscotch V2024.12.0 on Windows 11

Environment

Release

Version

Local

Originally created by @clibu on GitHub (Jan 6, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4660 Originally assigned to: @CuriousCorrelation on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior Rest - POST with body set to application/json isn't setting 'Content-Type: ' to application/json ### Steps to reproduce I'm using Rest - POST and have body set to application/json and I've set a raw JSON object. The server is getting an empty body object {}. And the generated code is: ```` curl --request POST \ --url http://localhost:8100/users \ --header 'Content-Type: ' \ --data '{ "event": "subscriber", "email": "mel.smith@gmail.com" }' ```` ie. 'Content-Type: ' is not set to 'application/josn' Hoppscotch V2024.12.0 on Windows 11 ### Environment Release ### Version Local
kerem 2026-03-16 21:32:39 +03:00
Author
Owner

@yousefmarey12 commented on GitHub (Jan 9, 2025):

Hi, I am ready to tackle this issue.

<!-- gh-comment-id:2580802028 --> @yousefmarey12 commented on GitHub (Jan 9, 2025): Hi, I am ready to tackle this issue.
Author
Owner

@yousefmarey12 commented on GitHub (Jan 9, 2025):

@clibu

Thank you for the issue.

Just to be clear, what is meant by "and have body set to application/json and I've set a raw JSON object." ?

On the Windows App, the only option I see is specifying Content-Type from a list of different data types, and a POST request is working perfectly for me.

In the image below, are you referring to the dropdown that my cursor is on?

image

<!-- gh-comment-id:2580842205 --> @yousefmarey12 commented on GitHub (Jan 9, 2025): @clibu Thank you for the issue. Just to be clear, what is meant by "and have body set to application/json and I've set a raw JSON object." ? On the Windows App, the only option I see is specifying `Content-Type` from a list of different data types, and a POST request is working perfectly for me. In the image below, are you referring to the dropdown that my cursor is on? ![image](https://github.com/user-attachments/assets/8d4b6bb8-5468-43cd-b786-c98b9cf1a3dc)
Author
Owner

@clibu commented on GitHub (Jan 9, 2025):

Yes, on the dropdown select application/json as shown here:
image
HTH

<!-- gh-comment-id:2581285183 --> @clibu commented on GitHub (Jan 9, 2025): Yes, on the dropdown select application/json as shown here: ![image](https://github.com/user-attachments/assets/c528c281-8c14-4ff1-87e6-b9b4726755ac) HTH
Author
Owner

@yousefmarey12 commented on GitHub (Jan 14, 2025):

@clibu

POST requests work with me, where I set the "Content Type" to be application/json. Have you tried sending POST requests to other servers via Hoppscotch?

<!-- gh-comment-id:2590946805 --> @yousefmarey12 commented on GitHub (Jan 14, 2025): @clibu POST requests work with me, where I set the "Content Type" to be `application/json`. Have you tried sending POST requests to other servers via Hoppscotch?
Author
Owner

@clibu commented on GitHub (Jan 15, 2025):

@yousefmarey12
Have you checked that:
a) the server is receiving JSON
b) click on "Generate Code" in Hoppscotch shows application/json ?

I'm using Insomnia and it works correctly.

<!-- gh-comment-id:2594057335 --> @clibu commented on GitHub (Jan 15, 2025): @yousefmarey12 Have you checked that: a) the server is receiving JSON b) click on "Generate Code" in Hoppscotch shows `application/json` ? I'm using [Insomnia](https://insomnia.rest/) and it works correctly.
Author
Owner

@CuriousCorrelation commented on GitHub (Jun 2, 2025):

Hi!

There have been several overhauls of the underlying kernel that relays information between the app and the interceptor since V24.12.0 and issue appears to be resolved in v25.5.0 and above based on current testing.

Image

Content-Type header is now being set correctly as content-type: application/json.

Closing this issue as resolved. If you're still experiencing inconsistent header behavior or notice any related issues, please feel free to reopen this issue with updated reproduction steps.

<!-- gh-comment-id:2929356753 --> @CuriousCorrelation commented on GitHub (Jun 2, 2025): Hi! There have been several overhauls of the underlying kernel that relays information between the app and the interceptor since `V24.12.0` and issue appears to be resolved in `v25.5.0` and above based on current testing. ![Image](https://github.com/user-attachments/assets/590077ce-4d8b-474d-9f79-8e5a9083abb2) `Content-Type` header is now being set correctly as `content-type: application/json`. Closing this issue as resolved. If you're still experiencing inconsistent header behavior or notice any related issues, please feel free to reopen this issue with updated reproduction steps.
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#1728
No description provided.