Interface IAsynchronousClient
Contract for Asynchronous RESTful API interactions.
This interface allows consumers to provide a custom API accessor client.
Namespace: Telerik.CallHome.OpenAPI.Client
Assembly: Telerik.Windows.Controls.dll
Syntax
public interface IAsynchronousClient
Methods
DeleteAsync<T>(String, RequestOptions, IReadableConfiguration, CancellationToken)
Executes a non-blocking call to some path
using the DELETE http verb.
Declaration
Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = null)
Parameters
System.String
path
The relative path to invoke. |
RequestOptions
options
The request parameters to pass along to the client. |
IReadableConfiguration
configuration
Per-request configurable settings. |
System.Threading.CancellationToken
cancellationToken
Cancellation Token to cancel the request. |
Returns
System.Threading.Tasks.Task<ApiResponse<T>>
A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
T
The return type. |
GetAsync<T>(String, RequestOptions, IReadableConfiguration, CancellationToken)
Executes a non-blocking call to some path
using the GET http verb.
Declaration
Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = null)
Parameters
System.String
path
The relative path to invoke. |
RequestOptions
options
The request parameters to pass along to the client. |
IReadableConfiguration
configuration
Per-request configurable settings. |
System.Threading.CancellationToken
cancellationToken
Cancellation Token to cancel the request. |
Returns
System.Threading.Tasks.Task<ApiResponse<T>>
A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
T
The return type. |
HeadAsync<T>(String, RequestOptions, IReadableConfiguration, CancellationToken)
Executes a non-blocking call to some path
using the HEAD http verb.
Declaration
Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = null)
Parameters
System.String
path
The relative path to invoke. |
RequestOptions
options
The request parameters to pass along to the client. |
IReadableConfiguration
configuration
Per-request configurable settings. |
System.Threading.CancellationToken
cancellationToken
Cancellation Token to cancel the request. |
Returns
System.Threading.Tasks.Task<ApiResponse<T>>
A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
T
The return type. |
OptionsAsync<T>(String, RequestOptions, IReadableConfiguration, CancellationToken)
Executes a non-blocking call to some path
using the OPTIONS http verb.
Declaration
Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = null)
Parameters
System.String
path
The relative path to invoke. |
RequestOptions
options
The request parameters to pass along to the client. |
IReadableConfiguration
configuration
Per-request configurable settings. |
System.Threading.CancellationToken
cancellationToken
Cancellation Token to cancel the request. |
Returns
System.Threading.Tasks.Task<ApiResponse<T>>
A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
T
The return type. |
PatchAsync<T>(String, RequestOptions, IReadableConfiguration, CancellationToken)
Executes a non-blocking call to some path
using the PATCH http verb.
Declaration
Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = null)
Parameters
System.String
path
The relative path to invoke. |
RequestOptions
options
The request parameters to pass along to the client. |
IReadableConfiguration
configuration
Per-request configurable settings. |
System.Threading.CancellationToken
cancellationToken
Cancellation Token to cancel the request. |
Returns
System.Threading.Tasks.Task<ApiResponse<T>>
A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
T
The return type. |
PostAsync<T>(String, RequestOptions, IReadableConfiguration, CancellationToken)
Executes a non-blocking call to some path
using the POST http verb.
Declaration
Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = null)
Parameters
System.String
path
The relative path to invoke. |
RequestOptions
options
The request parameters to pass along to the client. |
IReadableConfiguration
configuration
Per-request configurable settings. |
System.Threading.CancellationToken
cancellationToken
Cancellation Token to cancel the request. |
Returns
System.Threading.Tasks.Task<ApiResponse<T>>
A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
T
The return type. |
PutAsync<T>(String, RequestOptions, IReadableConfiguration, CancellationToken)
Executes a non-blocking call to some path
using the PUT http verb.
Declaration
Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = null)
Parameters
System.String
path
The relative path to invoke. |
RequestOptions
options
The request parameters to pass along to the client. |
IReadableConfiguration
configuration
Per-request configurable settings. |
System.Threading.CancellationToken
cancellationToken
Cancellation Token to cancel the request. |
Returns
System.Threading.Tasks.Task<ApiResponse<T>>
A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
T
The return type. |