Interface IAsynchronousClient
Contract for Asynchronous RESTful API interactions.
This interface allows consumers to provide a custom API accessor client.
Namespace: mailslurp.Client
Assembly: mailslurp.dll
Syntax
public interface IAsynchronousClient
Methods
View SourceDeleteAsync<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 = default)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
RequestOptions | options | The request parameters to pass along to the client. |
IReadableConfiguration | configuration | Per-request configurable settings. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<T>> | A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
Name | Description |
---|---|
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 = default)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
RequestOptions | options | The request parameters to pass along to the client. |
IReadableConfiguration | configuration | Per-request configurable settings. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<T>> | A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
Name | Description |
---|---|
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 = default)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
RequestOptions | options | The request parameters to pass along to the client. |
IReadableConfiguration | configuration | Per-request configurable settings. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<T>> | A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
Name | Description |
---|---|
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 = default)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
RequestOptions | options | The request parameters to pass along to the client. |
IReadableConfiguration | configuration | Per-request configurable settings. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<T>> | A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
Name | Description |
---|---|
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 = default)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
RequestOptions | options | The request parameters to pass along to the client. |
IReadableConfiguration | configuration | Per-request configurable settings. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<T>> | A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
Name | Description |
---|---|
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 = default)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
RequestOptions | options | The request parameters to pass along to the client. |
IReadableConfiguration | configuration | Per-request configurable settings. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<T>> | A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
Name | Description |
---|---|
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 = default)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
RequestOptions | options | The request parameters to pass along to the client. |
IReadableConfiguration | configuration | Per-request configurable settings. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<T>> | A task eventually representing the response data, decorated with ApiResponse<T> |
Type Parameters
Name | Description |
---|---|
T | The return type. |