TypedRest for .NET 1.3.6
build type-safe fluent-style REST API clients
TypedRest.Endpoints.Rpc.IConsumerEndpoint< in in TEntity > Interface Template Reference

RPC endpoint that takes TEntity as input when invoked. More...

Inheritance diagram for TypedRest.Endpoints.Rpc.IConsumerEndpoint< in in TEntity >:
TypedRest.Endpoints.Rpc.IRpcEndpoint TypedRest.Endpoints.IEndpoint

Public Member Functions

Task InvokeAsync (TEntity entity, CancellationToken cancellationToken=default)
 Sends the entity to the consumer. 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 TEntity as input when invoked.

Template Parameters
TEntityThe type of entity the endpoint takes as input.

Member Function Documentation

◆ InvokeAsync()

Task TypedRest.Endpoints.Rpc.IConsumerEndpoint< in in TEntity >.InvokeAsync ( TEntity  entity,
CancellationToken  cancellationToken = default 
)

Sends the entity to the consumer.

Parameters
entityThe TEntity to post as input.
cancellationTokenUsed to cancel the request.
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: