HttpEndpoint

interface HttpEndpoint<in Request, Dto, out Response>

Represents a set of transforming functions that is specific for an HTTP endpoint.

Usage scheme:

  1. requestCreator transforms Request into HttpRequestBuilder.

  2. Actual HTTP call with Ktor client.

  3. responseReader reads a Dto from HttpResponse.

  4. responseMapper transforms Dto into Response.

  5. If any exception occurred, it is mapped with errorMapper and rethrown.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard