TibiaKtClient
Create a client from a caller-provided HttpClient.
Parameters
An existing Ktor client, possibly shared across your app.
When true, applies this library’s defaults to a derived client
Optional User-Agent string. If null, a sensible default is used.
Extra client configuration applied after the library defaults.
Ownership: this constructor sets ownsClient to false; the caller manages baseClient lifecycle.
Create a client using a specific engine factory (e.g., OkHttp, CIO, Apache, Darwin).
Parameters
The engine factory to use for building the underlying HttpClient.
Optional User-Agent string. If null, a sensible default is used.
Extra client configuration applied after the library defaults.
Ownership: this constructor builds and owns the underlying client; close will close it.
Create a client using a specific engine instance.
Use this when you need to share or preconfigure the engine (connection pool, proxy, DNS, etc.) outside of this library.
Parameters
A concrete engine instance to back the HttpClient.
Optional User-Agent string. If null, a sensible default is used.
Extra client configuration applied after the library defaults.
Ownership: this constructor builds and owns the HttpClient, but you still own the engine if it’s reused elsewhere. Closing this client will not automatically close other clients that share the engine.