Package dev.fritz2.repositories.rest

Types

RestEntity
Link copied to clipboard
js
class RestEntity<T, I>(resource: Resource<T, I>, initialId: I, 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>, initialId: I, 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>, remote: Request, initialId: I, contentType: String = "application/json; charset=utf-8"): EntityRepository<T, I>
provides crud-functions for REST-API to a defined Resource
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
restQuery
Link copied to clipboard
js
fun <T, I, Q> restQuery(resource: Resource<T, I>, remote: Request, initialId: I, contentType: String = "application/json; charset=utf-8", 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
fun <T, I, Q> restQuery(resource: Resource<T, I>, url: String, initialId: I, contentType: String = "application/json; charset=utf-8", 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