Package-level declarations
Types
Link copied to clipboard
interface HttpDataSourceResolverConfigScope
Link copied to clipboard
Represents a set of transforming functions that is specific for an HTTP endpoint.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
fun HttpDataSourceResolver(config: HttpDataSourceResolverConfigScope.() -> Unit): DataSourceResolver
Creates a DataSourceResolver integrated with HttpClient. It is based on association between DataSourceKeys and HttpEndpoints described with config block.
Link copied to clipboard
inline fun <Request, Response> HttpEndpoint(noinline requestCreator: HttpRequestCreator<Request>, noinline errorMapper: HttpErrorMapper? = null): HttpEndpoint<Request, Response, Response>
Creates a HttpEndpoint with given transformation functions, that reads a Response form HttpResponse with HttpResponse.body and returns it without mapping.
inline fun <Request, Dto, Response> HttpEndpoint(noinline requestCreator: HttpRequestCreator<Request>, noinline responseMapper: HttpResponseMapper<Request, Dto, Response>, noinline errorMapper: HttpErrorMapper? = null): HttpEndpoint<Request, Dto, Response>
Creates a HttpEndpoint with given transformation functions that reads a Dto form HttpResponse with HttpResponse.body.
fun <Request, Dto, Response> HttpEndpoint(requestCreator: HttpRequestCreator<Request>, responseReader: HttpResponseReader<Dto>, responseMapper: HttpResponseMapper<Request, Dto, Response>, errorMapper: HttpErrorMapper? = null): HttpEndpoint<Request, Dto, Response>
Creates a HttpEndpoint with given transformation functions.