From d8668ce618f40b9125af53c0c280011d0af4156b Mon Sep 17 00:00:00 2001 From: ZProger <81753080+Zproger@users.noreply.github.com> Date: Thu, 16 Oct 2025 06:25:54 +0200 Subject: [PATCH] Fixed a syntax error in the file upload example --- docs/quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index 38da2fec36..e140b53cd7 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -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)