postman-app-support
postman-app-support copied to clipboard
Postman doesn't warn user about multiple / duplicate Content-Type headers after changing original type
Is there an existing issue for this?
- [x] I have searched the tracker for existing similar issues and I know that duplicates will be closed
Describe the Issue
In Postman I often get a notification that there is an extra / duplicate Content-Type header, which is very helpful since our Swagger was configured with everything as application/x-www-form-urlencoded, but we use actually use application/json in practice, and so we have been manually updating our collections to reflect this. We don't catch everything of course.
I now see that Postman permits duplicate Content-Type headers in instances like these where we have edited a request with one Content-Type to another. It shows me no warning whatsoever, regardless if the values are identical or different. This has caused a painful troubleshooting process, made a little extra complex by the hiding of auto-generated headers (like the one that recognizes that our request body is indeed JSON). If there is a setting for this it evades me.
Postman should display a clear, multi-styled warning without the need for hover for each instance of a duplicated header (such as strikethrough and a warning color for an overridden header, and italics and a different color for the overriding header). This way if an auto-generated header is hidden, the user will be able to see at a glance there is a duplicate, and save themselves some trouble (moreso in the unfortunate case of backing code with poor error handling). Then we can say, "Postman even helps us deal with the difficult endpoint programming we have to deal with" and good stuff like this 😊
Steps To Reproduce
(This bug only seems to affect existing requests; as contrast, see the "new request" screenshots in the following section.)
Case A:
- Open an existing request with one Content-Type, such as
Content-Type: application/x-www-form-urlencoded. - Update the Body to another type, such as Raw > JSON.
Case B:
- Open an existing request where the Content-Type has been changed by the previous process.
Screenshots or Videos
Please see the following example, where there is no tooltip, coloring, nor values with strikethrough text to help identify this redundancy:
If I create a new request from scratch with Content-Type: application/x-www-form-urlencoded and change the Body to Raw > JSON, I get the (subtle) warning:
...though it's really the most effective when hovering:
...though none of this matters if I don't display the auto-generated headers:
Operating System
Windows
Postman Version
Version
11.38.4
UI version
11.38.4-ui-250326-2337
Desktop platform version
11.37.5
Postman Platform
Postman App
User Account Type
Signed In User
Additional Context?
I have not tried importing any more requests via Swagger, though requests I've imported via curl statement still show the duplicate header warning. I have theorized that the affected requests might've needed importing before some recent Postman update to be affected, but it's just a theory.
Thanks for the consideration!