Interface IRemoteServiceInvoker
- Namespace
- GroupeIsa.Neos.ClusterCommunication
- Assembly
- GroupeIsa.Neos.ClusterCommunication.dll
Represents the definition of the client methods for interacting with remote services endpoints.
public interface IRemoteServiceInvoker
Methods
GetByteArrayAsync(RemoteServiceOptions)
Send a GET request with the specified options and return the response body as a byte array.
Task<byte[]> GetByteArrayAsync(RemoteServiceOptions options)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
Returns
- Task<byte[]>
A Task<TResult> that will return when the operation has completed with byte array.
GetByteArrayAsync(RemoteServiceOptions, CancellationToken)
Send a GET request with the specified options and return the response body as a byte array.
Task<byte[]> GetByteArrayAsync(RemoteServiceOptions options, CancellationToken cancellationToken)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel the operation.
Returns
- Task<byte[]>
A Task<TResult> that will return when the operation has completed with byte array.
GetStringAsync(RemoteServiceOptions)
Send a GET request with the specified options and return the response body as a string.
Task<string> GetStringAsync(RemoteServiceOptions options)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
Returns
- Task<string>
A Task<TResult> that will return when the operation has completed with string.
GetStringAsync(RemoteServiceOptions, CancellationToken)
Send a GET request with the specified options and return the response body as a string.
Task<string> GetStringAsync(RemoteServiceOptions options, CancellationToken cancellationToken)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel the operation.
Returns
- Task<string>
A Task<TResult> that will return when the operation has completed with string.
InvokeAsync(RemoteServiceOptions)
Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource
specified by options.Path.Path with the HTTP method.options.HttpMethod.HttpMethod
Task InvokeAsync(RemoteServiceOptions options)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
Returns
- Task
A Task<TResult> that will return when the operation has completed.
InvokeAsync(RemoteServiceOptions, CancellationToken)
Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource
specified by options.Path.Path with the HTTP method.options.HttpMethod.HttpMethod
Task InvokeAsync(RemoteServiceOptions options, CancellationToken cancellationToken)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel the operation.
Returns
- Task
A Task<TResult> that will return when the operation has completed.
InvokeAsync<TResponse>(RemoteServiceOptions)
Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource
specified by options.Path.Path with the HTTP method.options.HttpMethod.HttpMethod
Task<TResponse?> InvokeAsync<TResponse>(RemoteServiceOptions options)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
Returns
- Task<TResponse>
A Task<TResult> that will return when the operation has completed.
Type Parameters
TResponseThe type of the data that will be JSON deserialized from the response body.
InvokeAsync<TResponse>(RemoteServiceOptions, CancellationToken)
Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource
specified by options.Path.Path with the HTTP method.options.HttpMethod.HttpMethod
Task<TResponse?> InvokeAsync<TResponse>(RemoteServiceOptions options, CancellationToken cancellationToken)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel the operation.
Returns
- Task<TResponse>
A Task<TResult> that will return when the operation has completed.
Type Parameters
TResponseThe type of the data that will be JSON deserialized from the response body.
InvokeWithResponseAsync<TResponse>(RemoteServiceOptions, CancellationToken)
Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource
specified by options.Path.Path with the HTTP method.
Returns both the deserialized response data and the complete HTTP response message.options.HttpMethod.HttpMethod
Task<RemoteServiceResponse<TResponse>> InvokeWithResponseAsync<TResponse>(RemoteServiceOptions options, CancellationToken cancellationToken = default)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel the operation.
Returns
- Task<RemoteServiceResponse<TResponse>>
A Task<TResult> that will return when the operation has completed with response data and HTTP response message.
Type Parameters
TResponseThe type of the data that will be JSON deserialized from the response body.
SendAsync(RemoteServiceOptions, HttpClient?)
Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource
specified by options.Path.Path with the HTTP method.options.HttpMethod.HttpMethod
Task<HttpResponseMessage> SendAsync(RemoteServiceOptions options, HttpClient? client = null)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
clientHttpClientProvides a HTTP client for sending HTTP requests and receiving HTTP responses.
Returns
- Task<HttpResponseMessage>
A Task<TResult> that will return when the operation has completed.
SendAsync(RemoteServiceOptions, HttpClient?, CancellationToken)
Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource
specified by options.Path.Path with the HTTP method.options.HttpMethod.HttpMethod
Task<HttpResponseMessage> SendAsync(RemoteServiceOptions options, HttpClient? client, CancellationToken cancellationToken)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
clientHttpClientProvides a HTTP client for sending HTTP requests and receiving HTTP responses.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel the operation.
Returns
- Task<HttpResponseMessage>
A Task<TResult> that will return when the operation has completed.
SendAsync(RemoteServiceOptions, CancellationToken)
Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource
specified by options.Path.Path with the HTTP method.options.HttpMethod.HttpMethod
Task<HttpResponseMessage> SendAsync(RemoteServiceOptions options, CancellationToken cancellationToken)
Parameters
optionsRemoteServiceOptionsThe options to invoke the method on.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel the operation.
Returns
- Task<HttpResponseMessage>
A Task<TResult> that will return when the operation has completed.
SendAsync(HttpRequestMessage, HttpClient?, CancellationToken)
Sends an HTTP request as an asynchronous operation.
Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpClient? client = null, CancellationToken cancellationToken = default)
Parameters
requestHttpRequestMessageThe HTTP request message to send.
clientHttpClientProvides a HTTP client for sending HTTP requests and receiving HTTP responses.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<HttpResponseMessage>
A Task<TResult> that will return when the operation has completed.