HttpApiEndpoint

fun <Params, Result> HttpApiEndpoint(url: (Params) -> String, mapResponse: suspend (HttpResponse) -> Result): HttpApiEndpoint<Params, Result>

Creates an HttpApiEndpoint with the given URL and response mapping.

Return

The created HttpApiEndpoint.

Parameters

Params

The type of the parameters to be passed to the endpoint.

Result

The type of the result returned after mapping the response.

url

The URL for the endpoint.

mapResponse

The response mapping.