Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 9e77ec8

Browse files
committed
Fix client.py
1 parent ae2fdc6 commit 9e77ec8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ def http_request(self, method, url, body=None, headers=None):
8686
status_code = int(status_line.split(" ")[1])
8787

8888
# Return the status code and the body of the response
89-
return {status_code, body.decode("utf-8", errors="ignore")}
89+
return {
90+
"status": status_code,
91+
"body": body.decode("utf-8", errors="ignore")
92+
}
9093

9194
def head(self, url, headers=None):
9295
"""Carry out a HEAD request and returns status_code and empty body."""

0 commit comments

Comments
 (0)