Skip to content

The documentation refers urllib3.HTTPResponse which is now replaced by the aiohttp.ClientResponse #373

@nnseva

Description

@nnseva

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions