3using System.Net.Http.Headers;
5using System.Threading.Tasks;
16 set => httpClient.Timeout = value;
31 public HttpClient(System.Net.Http.HttpClient implementation)
33 httpClient = implementation ??
throw new ArgumentNullException(nameof(implementation));
48 public Task<HttpResponseMessage>
SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
TimeSpan Timeout
The request timeout.
Task< HttpResponseMessage > SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
Send an HTTP request.A Task<TResult> resulting in the HttpResponseMessage of the request.
HttpClient()
Initializes a new instance of the HttpClient class.
HttpRequestHeaders DefaultRequestHeaders
The HttpRequestHeaders used on every request.
readonly System.Net.Http.HttpClient httpClient
The real System.Net.Http.HttpClient.
HttpClient(System.Net.Http.HttpClient implementation)
Initializes a new instance of the HttpClient class.
For sending HTTP requests.