AbstractEndpoint
abstract class AbstractEndpoint(val uri: URI, val httpClient: OkHttpClient, val serializers: List<Serializer>, val errorHandler: ErrorHandler, val linkExtractor: LinkExtractor) : Endpoint
Base class for building endpoints, i.e., remote HTTP resources.
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.
Inheritors
Constructors
Link copied to clipboard
constructor(uri: URI, httpClient: OkHttpClient, serializers: List<Serializer>, errorHandler: ErrorHandler, linkExtractor: LinkExtractor)
Creates a new endpoint with a relative URI.
Properties
Functions
Link copied to clipboard
Deserializes an entity using the first serializer that supports the body's content type.
Link copied to clipboard
Link copied to clipboard
Retrieves a link template with a specific relation type.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Registers one or more default links for a specific relation type.
Link copied to clipboard
Registers a default link template for a specific relation type.