Skip to content
Myr

Fixed a syntax error in the file upload example (#3692)

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

authored by ZProger · committed by GitHub · parent 435e1da · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/quickstart.md+1 added-1 removed
189 unmodified lines
190You can also explicitly set the filename and content type, by using a tuple191of items for the file value:192193```pycon194>>> with open('report.xls', 'rb') report_file:194>>> with open('report.xls', 'rb') as report_file:195... files = {'upload-file': ('report.xls', report_file, 'application/vnd.ms-excel')}196... r = httpx.post("https://httpbin.org/post", files=files)197>>> print(r.text)198{
349 unmodified lines