Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class RestErrorMapper<E : ErrorSpec, P : Any>(payloadType: TypeInfo, val unauthorized: E? = null, val apiError: (P, HttpStatusCode) -> E, val networkError: (Throwable) -> E, val parseError: (Throwable) -> E)

Maps every failure of a TypedRestClient call to the caller's error type E.

Link copied to clipboard
open class TypedRestClient<E : ErrorSpec>(client: HttpClient = HttpClientFactory.create(), baseUrl: String = "", mapper: RestErrorMapper<E, *>)

A REST client whose every call works in Raise of the caller's error type E.

Functions

Link copied to clipboard
fun HttpRequestBuilder.xRealName(principal: Principal)

Sets the x-real-name header that ktkit's XRealNamePrincipalExtractor reads back as principal.