Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncate large response body in legacy sandbox #1034

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

appurva21
Copy link
Member

Issue

When setting up the legacy sandbox, the response buffer is, by default, converted to a string to support the global variable responseBody. This negatively affects the script execution performance for consumers who are not even consuming this value.

Fix

The ideal fix for this would be to lazily initialize responseBody through a getter, but due to how Uniscope is implemented, it is not possible to achieve that without a significant refactoring there (TLDR; the getter would get called at multiple places inside Uniscope).

The second best approach is to truncate the responseBody if it is too large (50MB). Since this is a deprecated syntax, users can (and should) use pm.response.text() for their requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant