AbstractEndpoint

constructor(uri: URI, httpClient: OkHttpClient, serializers: List<Serializer>, errorHandler: ErrorHandler, linkExtractor: LinkExtractor)

Parameters

uri

The HTTP URI of the remote element.

httpClient

The HTTP client used to communicate with the remote element.

serializers

A list of serializers used for entities received from the server, sorted from most to least preferred. Always uses first for sending to the server.

errorHandler

Handles errors in HTTP responses.

linkExtractor

Detects links in HTTP responses.


constructor(referrer: Endpoint, relativeUri: URI)

Creates a new endpoint with a relative URI.

Parameters

referrer

The endpoint used to navigate to this one.

relativeUri

The URI of this endpoint relative to the referrer's.