1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Added tests for binary request data.

This commit is contained in:
Jakub Roztocil
2012-08-01 00:52:30 +02:00
parent 8905b4fc72
commit 90d34ffd0d
7 changed files with 78 additions and 14 deletions

View File

@@ -120,6 +120,10 @@ class HTTPMessage(object):
# Body
if request.files:
# TODO: would be nice if we didn't need to encode the files again
for fn, fd in request.files.values():
# Rewind the files as they have already been read before.
fd.seek(0)
body, _ = request._encode_files(request.files)
else:
try: