You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
Python 3.3 fixes.
This commit is contained in:
@@ -168,4 +168,8 @@ class HTTPRequest(HTTPMessage):
|
||||
|
||||
@property
|
||||
def body(self):
|
||||
return self._orig.body or b''
|
||||
body = self._orig.body
|
||||
if isinstance(body, str):
|
||||
# Happens with JSON/form request data parsed from the command line.
|
||||
body = body.encode('utf8')
|
||||
return body or b''
|
||||
|
Reference in New Issue
Block a user