fix: large responses now download correctly [INS-2365]#9807
Open
arora-r wants to merge 8 commits intoKong:developfrom
Open
fix: large responses now download correctly [INS-2365]#9807arora-r wants to merge 8 commits intoKong:developfrom
arora-r wants to merge 8 commits intoKong:developfrom
Conversation
arora-r
commented
Apr 13, 2026
Comment on lines
+14
to
+15
| bodyPath?: string; | ||
| bodyCompression?: Compression; |
Author
There was a problem hiding this comment.
Note: Adding these to show where the file is stored locally, and if we need to decompress because we now can use getBodyBuffer(activeResponse) which is the file in disk instead of the data in memory
arora-r
commented
Apr 14, 2026
Comment on lines
+42
to
+49
| app.get('/large-json', (_req, res) => { | ||
| const items = Array.from({ length: 100_000 }, (_, i) => ({ | ||
| id: i, | ||
| name: `item-${i}`, | ||
| value: 'x'.repeat(100), | ||
| })); | ||
| res.status(200).json({ items }); | ||
| }); |
arora-r
commented
Apr 14, 2026
| @@ -0,0 +1,50 @@ | |||
| type: collection.insomnia.rest/5.0 | |||
Author
There was a problem hiding this comment.
Created the collection in the insomnia app and then exported them for this file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users that are requesting endpoints with large responses (>= 5MB) are shown a "Save To File" button in the response pane. Clicking this saves an empty file. Similarly, in the Preview button dropdown the options to export as raw response, prettified response, and http debug were also saving blank files.
The "Export as HAR" option uses the stored response body instead of the current
activeResponse.bodyBuffermaking it work as expected regardless of the response size. This PR follows similar logic to see if the currentbodyBufferis empty and to fallback into the actual stored response.I do want to note in this implementation; for large requests I've disabled the export as prettified response to prevent any high memory usage to lower the chance of crashing the app.
[Addresses INS-2365]