From: Recursing Date: Fri, 21 Feb 2020 12:15:59 +0000 (+0000) Subject: Standardize type documentation for HTTPRequest init X-Git-Tag: v6.1.0b1~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2814%2Fhead;p=thirdparty%2Ftornado.git Standardize type documentation for HTTPRequest init --- diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 8418cd7f7..4b7009df0 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -401,7 +401,9 @@ class HTTPRequest(object): :type headers: `~tornado.httputil.HTTPHeaders` or `dict` :arg body: HTTP request body as a string (byte or unicode; if unicode the utf-8 encoding will be used) - :arg body_producer: Callable used for lazy/asynchronous request bodies. + :type body: `str` or `bytes` + :arg collections.abc.Callable body_producer: Callable used for + lazy/asynchronous request bodies. It is called with one argument, a ``write`` function, and should return a `.Future`. It should call the write function with new data as it becomes available. The write function returns a