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 body to _body to prevent direct access #32

Merged
merged 1 commit into from
Nov 11, 2014
Merged

Move body to _body to prevent direct access #32

merged 1 commit into from
Nov 11, 2014

Conversation

dgraham
Copy link
Contributor

@dgraham dgraham commented Nov 11, 2014

The body property may be used for Streams in the future. This also avoids the temptation to access response.body directly, rather than going through a body consumer like response.text() or response.json().

The `body` property may be used for Streams in the future. This also
avoids the temptation to access `response.body` directly rather than
going through a body consumer like `response.text()` or
`response.json()`.
@josh
Copy link
Contributor

josh commented Nov 11, 2014

👍

Or use a WeakMap to track internal state.

dgraham added a commit that referenced this pull request Nov 11, 2014
Move body to _body to prevent direct access
@dgraham dgraham merged commit c35893f into master Nov 11, 2014
@dgraham dgraham deleted the hide-body branch November 11, 2014 16:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants