Merge pull request #2074 from Lukasa/filedoc

Ensure that we open files in binary mode in the docs.
This commit is contained in:
Cory Benfield
2014-05-28 17:01:10 +01:00
+1 -1
View File
@@ -229,7 +229,7 @@ Streaming Uploads
Requests supports streaming uploads, which allow you to send large streams or files without reading them into memory. To stream and upload, simply provide a file-like object for your body::
with open('massive-body') as f:
with open('massive-body', 'rb') as f:
requests.post('http://some.url/streamed', data=f)