Kong / Kong/insomnia

Using env var in header Content-Type messes up body formatter/highlighter

Open
#2,640 2 comments 0 reactions 0 assignees View on GitHub
needs-triage
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**
![image](https://user-images.githubusercontent.com/11375716/93660539-e21cad00-fa71-11ea-8524-294628df34cc.png)

![image](https://user-images.githubusercontent.com/11375716/93660535-d92bdb80-fa71-11ea-8781-3d454219189f.png)

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

![image](https://user-images.githubusercontent.com/11375716/93660549-f8c30400-fa71-11ea-9c8b-1697083e4d42.png)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.