Package dev.fritz2.repositories.rest

Types

RestEntity
Link copied to clipboard
js
class RestEntity<T, I>(resource: Resource<T, I>, url: String, contentType: String, remote: Request) : EntityRepository<T, I>
provides crud-functions for REST-API to a defined Resource
RestQuery
Link copied to clipboard
js
class RestQuery<T, I, Q>(resource: Resource<T, I>, url: String, contentType: String, remote: Request, buildQuery: suspend Request.(Q) -> Response) : QueryRepository<T, I, Q>
provides services to deal with queries for REST-API to a defined Resource

Functions

restEntity
Link copied to clipboard
js
fun <T, I> restEntity(resource: Resource<T, I>, url: String, contentType: String = "application/json; charset=utf-8", remote: Request = http(url)): EntityRepository<T, I>
provides crud-functions for REST-API to a defined Resource
restQuery
Link copied to clipboard
js
fun <T, I, Q> restQuery(resource: Resource<T, I>, url: String, contentType: String = "application/json; charset=utf-8", remote: Request = http(url), buildQuery: suspend Request.(Q) -> Response = { accept(contentType).get() }): QueryRepository<T, I, Q>
provides services to deal with queries for REST-API to a defined Resource