TypedRest for .NET 1.3.5
build type-safe fluent-style REST API clients
TypedRest.Endpoints.IEndpoint Interface Reference

Endpoint, i.e. a remote HTTP resource. More...

Inheritance diagram for TypedRest.Endpoints.IEndpoint:
TypedRest.Endpoints.EndpointBase TypedRest.Endpoints.Generic.IElementEndpoint< out out TEntity > TypedRest.Endpoints.Generic.IIndexerEndpoint< out out TElementEndpoint > TypedRest.Endpoints.ICachingEndpoint TypedRest.Endpoints.Raw.IBlobEndpoint TypedRest.Endpoints.Raw.IUploadEndpoint TypedRest.Endpoints.Reactive.IStreamingEndpoint< out out TEntity > TypedRest.Endpoints.Rpc.IRpcEndpoint

Public Member Functions

IReadOnlyList<(Uri uri, string? title)> GetLinks (string rel)
 Resolves all links with a specific relation type. Uses cached data from last response. More...
 
Uri Link (string rel)
 Resolves a single link with a specific relation type. Uses cached data from last response if possible. Tries lazy lookup with HTTP HEAD on cache miss. More...
 
Uri LinkTemplate (string rel, IDictionary< string, object > variables)
 Resolves a link template with a specific relation type. Uses cached data from last response if possible. Tries lazy lookup with HTTP HEAD on cache miss. More...
 
Uri LinkTemplate (string rel, object variables)
 Resolves a link template with a specific relation type. More...
 

Properties

Uri Uri [get]
 The HTTP URI of the remote resource.
 
HttpClient HttpClient [get]
 The HTTP client used to communicate with the remote resource.
 
MediaTypeFormatter Serializer [get]
 Controls the serialization of entities sent to and received from the server.
 
IErrorHandler ErrorHandler [get]
 Handles errors in responses.
 
ILinkExtractor LinkExtractor [get]
 Extracts links from responses.
 

Detailed Description

Endpoint, i.e. a remote HTTP resource.

Member Function Documentation

◆ GetLinks()

IReadOnlyList<(Uri uri, string? title)> TypedRest.Endpoints.IEndpoint.GetLinks ( string  rel)

Resolves all links with a specific relation type. Uses cached data from last response.

Parameters
relThe relation type of the links to look for.

Implemented in TypedRest.Endpoints.EndpointBase.

◆ Link()

Uri TypedRest.Endpoints.IEndpoint.Link ( string  rel)

Resolves a single link with a specific relation type. Uses cached data from last response if possible. Tries lazy lookup with HTTP HEAD on cache miss.

Parameters
relThe relation type of the link to look for.
Exceptions
KeyNotFoundExceptionNo link with the specified rel could be found.

Implemented in TypedRest.Endpoints.EndpointBase.

◆ LinkTemplate() [1/2]

Uri TypedRest.Endpoints.IEndpoint.LinkTemplate ( string  rel,
IDictionary< string, object >  variables 
)

Resolves a link template with a specific relation type. Uses cached data from last response if possible. Tries lazy lookup with HTTP HEAD on cache miss.

Parameters
relThe relation type of the link template to look for.
variablesVariables for resolving the template.
Returns
The href of the link resolved relative to this endpoint's URI.
Exceptions
KeyNotFoundExceptionNo link template with the specified rel could be found.

Implemented in TypedRest.Endpoints.EndpointBase.

◆ LinkTemplate() [2/2]

Uri TypedRest.Endpoints.IEndpoint.LinkTemplate ( string  rel,
object  variables 
)

Resolves a link template with a specific relation type.

Parameters
relThe relation type of the link template to look for.
variablesAn object used to provide properties for resolving the template.
Returns
The href of the link resolved relative to this endpoint's URI.
Exceptions
KeyNotFoundExceptionNo link template with the specified rel could be found.

Uses cached data from last response if possible. Tries lazy lookup with HTTP HEAD on cache miss.

Implemented in TypedRest.Endpoints.EndpointBase.


The documentation for this interface was generated from the following file: