rest Query Of
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>
Content copied to clipboard
provides services to deal with queries 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
build Query
function to build a Request for a given object defining the query
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>
Content copied to clipboard
provides services to deal with queries 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
build Query
function to build a Request for a given object defining the query