| |
@@ -179,7 +179,7 @@
|
| |
f = StringIO()
|
| |
|
| |
for chunk in body:
|
| |
- f.write(chunk)
|
| |
+ f.write(chunk.decode('utf-8'))
|
| |
|
| |
string = f.getvalue()
|
| |
f.close()
|
| |
@@ -244,9 +244,9 @@
|
| |
if response.stream:
|
| |
f.write(indent_text("body omitted because response is streaming\n", 2))
|
| |
else:
|
| |
- response.body = collapse_body(response.body)
|
| |
+ response.body = collapse_body(response.body).encode('utf-8')
|
| |
for chunk in response.body:
|
| |
- f.write(indent_text(chunk, 2))
|
| |
+ f.write(indent_text(chunk.decode('utf-8'), 2))
|
| |
|
| |
string = f.getvalue()
|
| |
f.close()
|
| |
Most of this file operates on strings, but there are a couple
of places operating on bytes, and we need to handle switching
back and forth between the two types in this case.
Signed-off-by: Neal Gompa ngompa13@gmail.com