projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42b8a6d
)
Added info about posted files headers
author
Alexander
<alex@erix.ru>
Tue, 28 Jan 2014 09:03:59 +0000
(12:03 +0300)
committer
Alexander
<alex@erix.ru>
Tue, 28 Jan 2014 09:03:59 +0000
(12:03 +0300)
docs/user/quickstart.rst
patch
|
blob
|
history
diff --git
a/docs/user/quickstart.rst
b/docs/user/quickstart.rst
index 3e802e19a3c4a9180a368a2215fe2868bd9d559f..f42736101e7eee7810efde891a82ed009877dc63 100644
(file)
--- a/
docs/user/quickstart.rst
+++ b/
docs/user/quickstart.rst
@@
-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