General bits and pieces that are reused between components.
- hikari.internal.net.create_client_session(connector, connector_owner, http_settings, raise_for_status, trust_env)[source]#
Generate a client session using the given settings.
You must invoke this from within a running event loop.
If you pass an explicit connector, then the connection that is created will not own the connector. You will be expected to manually close it __after__ the returned client session is closed to prevent leaking resources.
The connector to use.
True, then the client session will close the connector on shutdown. Otherwise, you must do it manually.
HTTP settings to use.
Trueto default to throwing exceptions if a request fails, or
Falseto default to not.
Trueto trust anything in environment variables and the
Falseto ignore it.
The client session to use.