Package dev.fritz2.repository.rest

Types

Link copied to clipboard
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

Link copied to clipboard
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

Link copied to clipboard
fun <T, I> restEntityOf(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> restEntityOf(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

Link copied to clipboard
fun <T, I, Q> restQueryOf(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>
fun <T, I, Q> restQueryOf(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