rest Entity Of
fun <T, I> restEntityOf(resource: Resource<T, I>, url: String, initialId: I, contentType: String = "application/json; charset=utf-8"): EntityRepository<T, I>
Content copied to clipboard
provides CRUD-functions for REST-API to a defined Resource
Parameters
resource
definition of the Resource
url
base-url of the REST-API
initial Id
id to compare a given resource for differentiation of adding or updating
content Type
to be used by the REST-API
fun <T, I> restEntityOf(resource: Resource<T, I>, remote: Request, initialId: I, contentType: String = "application/json; charset=utf-8"): EntityRepository<T, I>
Content copied to clipboard
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.
initial Id
id to compare a given resource for differentiation of adding or updating
content Type
to be used by the REST-API