Skip to content

Commit c0ea497

Browse files
Fix Issue #86
1 parent 200b068 commit c0ea497

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python_http_client/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ def to_dict(self):
5353
"""
5454
:return: dict of response from the API
5555
"""
56-
return json.loads(self.body.decode('utf-8'))
56+
if self.body:
57+
return json.loads(self.body.decode('utf-8'))
58+
else:
59+
return None
5760

5861

5962
class Client(object):

0 commit comments

Comments
 (0)