restEntity

fun <T, I> restEntity(resource: Resource<T, I>, url: String, initialId: I, contentType: String = "application/json; charset=utf-8"): EntityRepository<T, I>

provides CRUD-functions for REST-API to a defined Resource

Parameters

resource

definition of the Resource

url

base-url of the REST-API

initialId

id to compare a given resource for differentiation of adding or updating

contentType

to be used by the REST-API

fun <T, I> restEntity(resource: Resource<T, I>, remote: Request, initialId: I, contentType: String = "application/json; charset=utf-8"): EntityRepository<T, I>

provides crud-functions for REST-API to a defined Resource

Parameters

resource

definition of the Resource

remote

base Request to be used by all subsequent requests. Use it to configure authentication, etc.

initialId

id to compare a given resource for differentiation of adding or updating

contentType

to be used by the REST-API