]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Fix sample in quickstart.md (#2747)
authorJohnny Lim <izeye@naver.com>
Thu, 22 Jun 2023 08:44:44 +0000 (17:44 +0900)
committerGitHub <noreply@github.com>
Thu, 22 Jun 2023 08:44:44 +0000 (09:44 +0100)
docs/quickstart.md

index fc0b05841ee3b60d9de609612c0415cef646dea8..07cbfd08653029f69d1d537765f6fe08982ba235 100644 (file)
@@ -367,7 +367,7 @@ If you're using streaming responses in any of these ways then the `response.cont
 
 ```pycon
 >>> with httpx.stream("GET", "https://www.example.com") as r:
-...     if r.headers['Content-Length'] < TOO_LONG:
+...     if int(r.headers['Content-Length']) < TOO_LONG:
 ...         r.read()
 ...         print(r.text)
 ```