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

Remove text-related inherent methods on Body #142

Closed
sagebind opened this issue Dec 11, 2019 · 0 comments · Fixed by #143
Closed

Remove text-related inherent methods on Body #142

sagebind opened this issue Dec 11, 2019 · 0 comments · Fixed by #143
Milestone

Comments

@sagebind
Copy link
Owner

In view of #90, we must acknowledge the fact that parsing the contents of a response body may not necessarily be doable correctly without inspecting response headers that indicate the encoding being used, content type, etc. We should remove the following inherent methods:

  • Body::text
  • Body::text_async
  • Body::json

These already have equivalent methods in ResponseExt that can be used instead. This also tightens up the API.

@sagebind sagebind added this to the 0.9 milestone Dec 11, 2019
sagebind added a commit that referenced this issue Dec 18, 2019
- Prefix constructor-like functions with `from_` for consistency.
- Remove text-related methods (fixes #142).
- Remove `Bytes` from public API for more stability.
sagebind added a commit that referenced this issue Jan 9, 2020
- Prefix constructor-like functions with `from_` for consistency.
- Remove text-related methods (fixes #142).
- Remove `Bytes` from public API for more stability.
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 a pull request may close this issue.

1 participant