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)#
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.
The client session to use.
- async hikari.internal.net.generate_error_response(response)#
Given an erroneous HTTP response, return a corresponding exception.