Interface IHttpRequestBuilder
Interface for a class that can build HTTP requests.
Namespace: Tableau.Migration.Net
Assembly: Tableau.Migration.dll
Syntax
public interface IHttpRequestBuilder
Properties
Request
Gets the built HTTP request.
Declaration
HttpRequestMessage Request { get; }
Property Value
| Type | Description |
|---|---|
| HttpRequestMessage |
Methods
SendAsync(HttpCompletionOption, CancellationToken)
Send the HTTP request as an asynchronous operation.
Declaration
Task<IHttpResponseMessage> SendAsync(HttpCompletionOption completionOption, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpCompletionOption | completionOption | When the operation should complete (as soon as a response is available or after reading the whole response content). |
| CancellationToken | cancellationToken | The cancellation token to cancel operation. |
Returns
| Type | Description |
|---|---|
| Task<IHttpResponseMessage> | The task object representing the asynchronous operation. |
SendAsync(CancellationToken)
Send the HTTP request as an asynchronous operation.
Declaration
Task<IHttpResponseMessage> SendAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The cancellation token to cancel operation. |
Returns
| Type | Description |
|---|---|
| Task<IHttpResponseMessage> | The task object representing the asynchronous operation. |
SendAsync<TResponse>(CancellationToken)
Send the HTTP request as an asynchronous operation.
Declaration
Task<IHttpResponseMessage<TResponse>> SendAsync<TResponse>(CancellationToken cancellationToken) where TResponse : class
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The cancellation token to cancel operation. |
Returns
| Type | Description |
|---|---|
| Task<IHttpResponseMessage<TResponse>> | The task object representing the asynchronous operation. |
Type Parameters
| Name | Description |
|---|---|
| TResponse | The type of response. |