Added info about posted files headers
authorAlexander <alex@erix.ru>
Tue, 28 Jan 2014 09:03:59 +0000 (12:03 +0300)
committerAlexander <alex@erix.ru>
Tue, 28 Jan 2014 09:03:59 +0000 (12:03 +0300)
docs/user/quickstart.rst

index 3e802e19a3c4a9180a368a2215fe2868bd9d559f..f42736101e7eee7810efde891a82ed009877dc63 100644 (file)
@@ -234,10 +234,10 @@ Requests makes it simple to upload Multipart-encoded files::
       ...
     }
 
-You can set the filename explicitly::
+You can set the filename, content_type and headers explicitly:
 
     >>> url = 'http://httpbin.org/post'
-    >>> files = {'file': ('report.xls', open('report.xls', 'rb'))}
+    >>> files = {'file': ('report.xls', open('report.xls', 'rb'), 'application/vnd.ms-excel', {'Expires': '0'})}
 
     >>> r = requests.post(url, files=files)
     >>> r.text