]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Fixed a syntax error in the file upload example (#3692)
authorZProger <81753080+Zproger@users.noreply.github.com>
Thu, 16 Oct 2025 09:04:38 +0000 (11:04 +0200)
committerGitHub <noreply@github.com>
Thu, 16 Oct 2025 09:04:38 +0000 (10:04 +0100)
docs/quickstart.md

index 38da2fec36db69979052d52fefadb81a42bc289b..e140b53cd79583afd9425d8ace936b56a68c1fc4 100644 (file)
@@ -191,7 +191,7 @@ You can also explicitly set the filename and content type, by using a tuple
 of items for the file value:
 
 ```pycon
->>> with open('report.xls', 'rb') report_file:
+>>> with open('report.xls', 'rb') as report_file:
 ...     files = {'upload-file': ('report.xls', report_file, 'application/vnd.ms-excel')}
 ...     r = httpx.post("https://httpbin.org/post", files=files)
 >>> print(r.text)