Skip to content
Peter Araujo edited this page Jul 28, 2024 · 1 revision

Default client

All services have a default client that is already set up for you. This client is called lazily, so you can create another one for all or some requests if needed.

Accessing the default client

You can access the default client in the following way:

ArticApiClient.defaultClient

Custom client

You can create a custom client in the following way:

val customClient = ArticApiClient(
    logLevel = LogLevel.INFO
)

You can also configure other things, like engine and URL.

Using other clients

Services can take any HttpClient. Therefore, you can create one from scratch. However, keep in mind that the provided client handles api-specific errors. You can use the provided one as reference.

Clone this wiki locally