Using env var in header Content-Type messes up body formatter/highlighter
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
**Describe the bug**
Using env var in header Content-Type messes up body formatter/highlighter.
**To Reproduce**
Steps to reproduce the behavior:
1. Set an env variable to `application/json
2. Use that variable in requests' header -> `Content-Type`
3. Body highlighter goes away (white color and beautify json is missing) even though JSON is selected at top
**Expected behavior**
Highlighter and Beautify JSON option work as normal.
**Screenshots**


**Desktop (please complete the following information):**
- OS: Win 10
- Installation Method: installer
- App Version 2020.4.0

Contributor guide
Research direction
Reproduce the issue in Insomnia 2020.4.0 on Windows with an environment variable set to application/json and used for the Content-Type header. Trace the body formatter and highlighter behavior for that request, then verify that JSON highlighting and the Beautify JSON option work normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100