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

Move Obj stringify step to _prepare #1190

Closed
hueniverse opened this issue Dec 9, 2013 · 0 comments
Closed

Move Obj stringify step to _prepare #1190

hueniverse opened this issue Dec 9, 2013 · 0 comments
Assignees
Labels
breaking changes Change that can breaking existing code feature New functionality or improvement
Milestone

Comments

@hueniverse
Copy link
Contributor

The object response isn't consistent with the rest of the response types due to performing JSON.stringify at construction time instead of during the _prepare stage. This requires supporting the update() method to regenerate the internal payload buffer.

This change will remove the update() method and will delay conversion until right before onPreResponse is called. It will also require creating a new response object in order to make changes to the internal raw data (which by itself can be reused).

@ghost ghost assigned hueniverse Dec 9, 2013
jmonster pushed a commit to jmonster/hapi that referenced this issue Feb 10, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking changes Change that can breaking existing code feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

1 participant