TypedRest for .NET 1.3.6
build type-safe fluent-style REST API clients
TypedRest.Endpoints.Rpc.IProducerEndpoint< out out TResult > Interface Template Reference

RPC endpoint that takes no input and returns TResult as output when invoked. More...

Inheritance diagram for TypedRest.Endpoints.Rpc.IProducerEndpoint< out out TResult >:
TypedRest.Endpoints.Rpc.IRpcEndpoint TypedRest.Endpoints.IEndpoint

Public Member Functions

ITask< TResult > InvokeAsync (CancellationToken cancellationToken=default)
 Gets a result from the producer. More...
 
- Public Member Functions inherited from TypedRest.Endpoints.Rpc.IRpcEndpoint
Task ProbeAsync (CancellationToken cancellationToken=default)
 Queries the server about capabilities of the endpoint without performing any action. More...
 
- Public Member Functions inherited from TypedRest.Endpoints.IEndpoint
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...
 

Additional Inherited Members

- Properties inherited from TypedRest.Endpoints.Rpc.IRpcEndpoint
bool? InvokeAllowed [get]
 Shows whether the server has indicated that the invoke method is currently allowed. More...
 
- Properties inherited from TypedRest.Endpoints.IEndpoint
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

RPC endpoint that takes no input and returns TResult as output when invoked.

Template Parameters
TResultThe type of entity the endpoint returns as output.

Member Function Documentation

◆ InvokeAsync()

ITask< TResult > TypedRest.Endpoints.Rpc.IProducerEndpoint< out out TResult >.InvokeAsync ( CancellationToken  cancellationToken = default)

Gets a result from the producer.

Parameters
cancellationTokenUsed to cancel the request.
Returns
The TResult returned by the server.
Exceptions
AuthenticationExceptionHttpStatusCode.Unauthorized
UnauthorizedAccessExceptionHttpStatusCode.Forbidden
KeyNotFoundExceptionHttpStatusCode.NotFound or HttpStatusCode.Gone
HttpRequestExceptionOther non-success status code.

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