Skip to content

Endpoint types

Endpoints are the main building blocks of TypedRest. An endpoint represents an URI that provides methods for interacting with a specific resource. The type of the endpoint determines the available methods. An endpoint can also provide child endpoints (represent child URIs) via composition.

TypedRest provides a number of endpoint types modelling common REST patterns. Most APIs can be consumed by either directly using these types or by deriving from them and adding additional methods for special use cases.

Entry endpoints represent the top-level URI of APIs.

Generic endpoints allow you to model collections and elements:

RPC endpoints allow you to interact with non-RESTful resources that act like callable functions:

Raw endpoints allow you to transmit binary data rather than serialized objects:

Reactive endpoints allow you to receive data as push streams rather than explicitly pulling:

The constructors of all endpoints except entry endpoints take a referrer parameter. This is uses to inherit relative URI bases and configuration such as error handling and link handling.