Skip to content

Conversation

@Krishna2004V
Copy link

@Krishna2004V Krishna2004V commented Nov 25, 2025

Fixes #2155

Summary

  • Documents that streaming responses (stream=True with Response.raw) don't automatically decompress gzipped content, and provides the workaround.

Changes

  • Added note to docs/user/advanced.rst in "Body Content Workflow" section
  • Updated FAQ "Encoded Data?" section in docs/community/faq.rst
  • Included examples with JSON and XML parsing

When using stream=True and accessing Response.raw, gzipped/deflated
responses are not automatically decompressed. This adds documentation
explaining this behavior and showing how to enable decompression with
r.raw.decode_content = True.

Fixes psf#2155
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.

Streaming gzipped responses

1 participant