Preview Mode: Visual Preview / Source Code outputting [] instead of JSON response
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
**Describe the bug**
I am testing my Rest APIs that sends back a JSON response. "Visual Preview" and "Source Code" shows [] as the response, white the "Raw Data" option shows the proper JSON response. If i hit the same API using Postman, the formatting shows properly. I am sharing the screencast of both Insomnia and Postman, may be this will help you get an idea of what is this happening. Also, attaching the header information so that you may know why is this happening.
**Expected behavior**
JSON response should show in a formatted manner.
**Screenshots**
Insomnia:
https://share.getcloudapp.com/Z4uqnzex
Postman:
https://share.getcloudapp.com/llun7wmY
Headers:
https://share.getcloudapp.com/12uK7E9L
**Desktop (please complete the following information):**
- OS: macOS 10.14.6 (18G7016)
- Installation Method: dmg
- App Version 2020.5.2
**Additional context**
Version: Insomnia Core 2020.5.2
Release date: 09/12/2020
OS: Darwin x64 18.7.0
Electron: 9.1.1
Node: 12.14.1
V8: 8.3.110.13-electron.0
Architecture: x64
node-libcurl: libcurl/7.69.1 OpenSSL/1.1.1g zlib/1.2.11 brotli/1.0.7 libidn2/2.1.1 libssh2/1.9.0 nghttp2/1.41.0
Contributor guide
Research direction
Start by reproducing the issue in Visual Preview and Source Code with a JSON API response, then compare both views with Raw Data. Done means the response is displayed as formatted JSON in both affected views rather than as [].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100