Skip to content
Myr

Added info about posted files headers

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Alexander · committed by Alexander · parent 42b8a6d · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:docs/user/quickstart.rst+2 added-2 removed
232 unmodified lines
233 },234 ...235 }236237You can set the filename explicitly::237You can set the filename, content_type and headers explicitly:238239 >>> url = 'http://httpbin.org/post'240 >>> files = {'file': ('report.xls', open('report.xls', 'rb'))}240 >>> files = {'file': ('report.xls', open('report.xls', 'rb'), 'application/vnd.ms-excel', {'Expires': '0'})}241242 >>> r = requests.post(url, files=files)243 >>> r.text244 {
197 unmodified lines