]> git.ipfire.org Git - thirdparty/httpx.git/commit
Expand docs note for async custom handler responses (#1916)
authorTyler Chamberlain <hexarobi@gmail.com>
Mon, 1 Nov 2021 11:39:18 +0000 (06:39 -0500)
committerGitHub <noreply@github.com>
Mon, 1 Nov 2021 11:39:18 +0000 (11:39 +0000)
commitda8f959af02e8d8dec69311ac8981fed90944573
tree221a204ea63e25f1f48f9a5db7b33a678ecd1942
parent62b1666dc6c6b012b258574c4239b8ff8f481619
Expand docs note for async custom handler responses (#1916)

* Expand note for async custom handler responses

Custom response handlers need to run `response.read()` before they can read the content of the response. However when using an AsyncClient this will produce an error of `RuntimeError: Attempted to call a sync iterator on an async stream.`. Took me some digging to figure out I just needed to use `response.aread()` here instead of `response.read()` so figured I would an MR with an expansion on the note for anyone else.
Thanks!

* Update advanced.md
docs/advanced.md