From: Vytautas Liuolia Date: Sun, 23 Jan 2022 20:37:27 +0000 (+0100) Subject: Do not recommend the deprecated `data=` kwarg for passing bytes. (#2044) X-Git-Tag: 0.22.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d299e6ff599f050bb4805779bcc2b9653bd3ca4f;p=thirdparty%2Fhttpx.git Do not recommend the deprecated `data=` kwarg for passing bytes. (#2044) (`data=` is meant for sending form data.) --- diff --git a/docs/async.md b/docs/async.md index 09d2940b..8782cdea 100644 --- a/docs/async.md +++ b/docs/async.md @@ -109,7 +109,7 @@ When sending a streaming request body with an `AsyncClient` instance, you should async def upload_bytes(): ... # yield byte content -await client.post(url, data=upload_bytes()) +await client.post(url, content=upload_bytes()) ``` ### Explicit transport instances