Skip to content

Commit

Permalink
WIP handle streamed content
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Ratto committed Nov 2, 2020
1 parent 207ca64 commit b4e2089
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion requests_toolbelt/utils/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ def _dump_response_data(response, prefixes, bytearr):

bytearr.extend(prefix + b'\r\n')

bytearr.extend(response.content)
if not response._content_consumed or response._content is False:
bytearr.extend(b'<< Response body is being streamed >>')
else:
bytearr.extend(response.content)


def _coerce_to_bytes(data):
Expand Down

0 comments on commit b4e2089

Please sign in to comment.