Interface IServiceHttpClient
This interface abstracts the Task of sending HttpRequestMessage.
Inherited Members
Namespace: Unity.Cloud.Common
Syntax
public interface IServiceHttpClient : IHttpClient
Methods
SendAsync(HttpRequestMessage, ServiceHttpClientOptions, CancellationToken)
Send an asynchronous HTTP request.
Declaration
Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, ServiceHttpClientOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
HttpRequestMessage | request | The request to be sent. |
ServiceHttpClientOptions | options | The options for the client. |
CancellationToken | cancellationToken | Optional cancellation token that will try to cancel the operation. |
Returns
Type | Description |
---|---|
Task<HttpResponseMessage> | A task that will hold the HttpResponseMessage once the request is completed |