Ktorfit

class Ktorfit(baseUrl: String, httpClient: <ERROR CLASS>)

Main class for Ktorfit, create the class than use the create() function.

Parameters

baseUrl

that will be used for every request with object

httpClient

client that will be used for every request with object

Constructors

Ktorfit
Link copied to clipboard
fun Ktorfit(baseUrl: String, httpClient: <ERROR CLASS> = HttpClient())

Functions

addResponseConverter
Link copied to clipboard
fun addResponseConverter(ResponseConverter: ResponseConverter): Ktorfit

Use this to add ResponseConverter for unsupported return types of requests

getResponseConverters
Link copied to clipboard
fun getResponseConverters(): MutableList<ResponseConverter>

Properties

baseUrl
Link copied to clipboard
var baseUrl: String
httpClient
Link copied to clipboard
var httpClient: <ERROR CLASS>

Extensions

create
Link copied to clipboard
inline fun <T> Ktorfit.create(): T

This will make IntelliJ think that this function exists. The real implementation will be generated by the KSP plugin Ktorfit will return an implementation of type T for a requested interface