Skip to content

Allow AIOHTTPClient constructor to take user-provided ClientSession #1736

@amacfie-tc

Description

@amacfie-tc

Is your feature request related to a problem? Please describe.

The AIOHTTPClient constructor sets self._cached_session = None and uses the _session method to load a aiohttp.ClientSession into the field later. It would be nice to be able to provide the ClientSession or at least the TCPConnector so it could be customized, or share a connection pool, etc.

Describe the solution you'd like

No response

Describe alternatives you've considered

It is possible to set _cached_session manually after construction, but presumably this is an unstable interface.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions