-
Notifications
You must be signed in to change notification settings - Fork 79
Description
Problem description
Since the aiohttp is used, the documentation erroneously refers to the urllib3 and synchronous request execution, like here.
Details
ApiClient.call_api() wrong description
The following is written:
Makes the HTTP request (synchronous) and returns deserialized data.
To make an async_req request, set the async_req parameter.
Although the call_api
is a synchronous function by itself, the returned value is a __call_api()
awaitable, so the request execution is actually asynchronous (using aiohttp in the following steps).
BTW I'm not sure that the async_req
parameter (and corresponding request pooling inside the multiprocessing pool) is necessary yet.
_preload_content
parameter wrong description
Actually, the _preload_content=False
leads to returning the aiohttp.ClientResponse
instead of the urllib3.HTTPResponse
as wrongly referred by the documentation in many places, and messes up the reader who is going to create the result streaming or something like this.
BTW it's useful to create some parameter or interface to have the (asynchronous) iterateable structured output instead of lists.