6.6内置属性与方法

IHttpRemoteService 服务类型包含多个属性以及丰富多样的方法。

IHttpRemoteService 服务类型包含多个属性以及丰富多样的方法。

内置属性#

cs
// 获取 HTTP 远程请求选项,返回值类型为 HttpRemoteOptionsvar remoteOptions = httpRemoteService.RemoteOptions;// 获取 IServiceProvider 接口实例var serviceProvider = httpRemoteService.ServiceProvider;

内置方法#

  • 核心方法
cs
// 返回 HttpResponseMessage 对象httpRemoteService.Send(httpRequestBuilder, cancellationToken);httpRemoteService.Send(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);await httpRemoteService.SendAsync(httpRequestBuilder, cancellationToken);await httpRemoteService.SendAsync(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);// 返回目标 T 类型httpRemoteService.SendAs<T>(httpRequestBuilder, cancellationToken);httpRemoteService.SendAs<T>(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);await httpRemoteService.SendAsAsync<T>(httpRequestBuilder, cancellationToken);await httpRemoteService.SendAsAsync<T>(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Send<T>(httpRequestBuilder, cancellationToken);httpRemoteService.Send<T>(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);await httpRemoteService.SendAsync<T>(httpRequestBuilder, cancellationToken);await httpRemoteService.SendAsync<T>(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);// 返回 object 类型,实际类型为 resultTypehttpRemoteService.SendAs(resultType, httpRequestBuilder, cancellationToken);httpRemoteService.SendAs(resultType, httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);await httpRemoteService.SendAsAsync(resultType, httpRequestBuilder, cancellationToken);await httpRemoteService.SendAsAsync(resultType, httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);// 返回字符串类型httpRemoteService.SendAsString(httpRequestBuilder, cancellationToken);httpRemoteService.SendAsString(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);await httpRemoteService.SendAsStringAsync(httpRequestBuilder, cancellationToken);await httpRemoteService.SendAsStringAsync(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);// 返回字节数组类型httpRemoteService.SendAsByteArray(httpRequestBuilder, cancellationToken);httpRemoteService.SendAsByteArray(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);await httpRemoteService.SendAsByteArrayAsync(httpRequestBuilder, cancellationToken);await httpRemoteService.SendAsByteArrayAsync(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);// 返回 Stream 类型httpRemoteService.SendAsStream(httpRequestBuilder, cancellationToken);httpRemoteService.SendAsStream(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);await httpRemoteService.SendAsStreamAsync(httpRequestBuilder, cancellationToken);await httpRemoteService.SendAsStreamAsync(httpRequestBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);
  • 请求谓词方法
cs
// ============ GET ============// 返回 HttpResponseMessage 对象httpRemoteService.Get(requestUri, configure, cancellationToken);httpRemoteService.Get(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.GetAsync(requestUri, configure, cancellationToken);await httpRemoteService.GetAsync(requestUri, completionOption, configure, cancellationToken);// 返回目标 T 类型httpRemoteService.GetAs<T>(requestUri, configure, cancellationToken);httpRemoteService.GetAs<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.GetAsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.GetAsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Get<T>(requestUri, configure, cancellationToken);httpRemoteService.Get<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.GetAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.GetAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回字符串类型httpRemoteService.GetAsString(requestUri, configure, cancellationToken);httpRemoteService.GetAsString(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.GetAsStringAsync(requestUri, configure, cancellationToken);await httpRemoteService.GetAsStringAsync(requestUri, completionOption, configure, cancellationToken);// 返回字节数组类型httpRemoteService.GetAsByteArray(requestUri, configure, cancellationToken);httpRemoteService.GetAsByteArray(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.GetAsByteArrayAsync(requestUri, configure, cancellationToken);await httpRemoteService.GetAsByteArrayAsync(requestUri, completionOption, configure, cancellationToken);// 返回 Stream 类型httpRemoteService.GetAsStream(requestUri, configure, cancellationToken);httpRemoteService.GetAsStream(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.GetAsStreamAsync(requestUri, configure, cancellationToken);await httpRemoteService.GetAsStreamAsync(requestUri, completionOption, configure, cancellationToken);// ============ PUT ============// 返回 HttpResponseMessage 对象httpRemoteService.Put(requestUri, configure, cancellationToken);httpRemoteService.Put(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PutAsync(requestUri, configure, cancellationToken);await httpRemoteService.PutAsync(requestUri, completionOption, configure, cancellationToken);// 返回目标 T 类型httpRemoteService.PutAs<T>(requestUri, configure, cancellationToken);httpRemoteService.PutAs<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PutAsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.PutAsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Put<T>(requestUri, configure, cancellationToken);httpRemoteService.Put<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PutAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.PutAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回字符串类型httpRemoteService.PutAsString(requestUri, configure, cancellationToken);httpRemoteService.PutAsString(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PutAsStringAsync(requestUri, configure, cancellationToken);await httpRemoteService.PutAsStringAsync(requestUri, completionOption, configure, cancellationToken);// 返回字节数组类型httpRemoteService.PutAsByteArray(requestUri, configure, cancellationToken);httpRemoteService.PutAsByteArray(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PutAsByteArrayAsync(requestUri, configure, cancellationToken);await httpRemoteService.PutAsByteArrayAsync(requestUri, completionOption, configure, cancellationToken);// 返回 Stream 类型httpRemoteService.PutAsStream(requestUri, configure, cancellationToken);httpRemoteService.PutAsStream(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PutAsStreamAsync(requestUri, configure, cancellationToken);await httpRemoteService.PutAsStreamAsync(requestUri, completionOption, configure, cancellationToken);// ============ POST ============// 返回 HttpResponseMessage 对象httpRemoteService.Post(requestUri, configure, cancellationToken);httpRemoteService.Post(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PostAsync(requestUri, configure, cancellationToken);await httpRemoteService.PostAsync(requestUri, completionOption, configure, cancellationToken);// 返回目标 T 类型httpRemoteService.PostAs<T>(requestUri, configure, cancellationToken);httpRemoteService.PostAs<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PostAsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.PostAsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Post<T>(requestUri, configure, cancellationToken);httpRemoteService.Post<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PostAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.PostAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回字符串类型httpRemoteService.PostAsString(requestUri, configure, cancellationToken);httpRemoteService.PostAsString(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PostAsStringAsync(requestUri, configure, cancellationToken);await httpRemoteService.PostAsStringAsync(requestUri, completionOption, configure, cancellationToken);// 返回字节数组类型httpRemoteService.PostAsByteArray(requestUri, configure, cancellationToken);httpRemoteService.PostAsByteArray(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PostAsByteArrayAsync(requestUri, configure, cancellationToken);await httpRemoteService.PostAsByteArrayAsync(requestUri, completionOption, configure, cancellationToken);// 返回 Stream 类型httpRemoteService.PostAsStream(requestUri, configure, cancellationToken);httpRemoteService.PostAsStream(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PostAsStreamAsync(requestUri, configure, cancellationToken);await httpRemoteService.PostAsStreamAsync(requestUri, completionOption, configure, cancellationToken);// ============ DELETE ============// 返回 HttpResponseMessage 对象httpRemoteService.Delete(requestUri, configure, cancellationToken);httpRemoteService.Delete(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.DeleteAsync(requestUri, configure, cancellationToken);await httpRemoteService.DeleteAsync(requestUri, completionOption, configure, cancellationToken);// 返回目标 T 类型httpRemoteService.DeleteAs<T>(requestUri, configure, cancellationToken);httpRemoteService.DeleteAs<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.DeleteAsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.DeleteAsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Delete<T>(requestUri, configure, cancellationToken);httpRemoteService.Delete<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.DeleteAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.DeleteAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回字符串类型httpRemoteService.DeleteAsString(requestUri, configure, cancellationToken);httpRemoteService.DeleteAsString(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.DeleteAsStringAsync(requestUri, configure, cancellationToken);await httpRemoteService.DeleteAsStringAsync(requestUri, completionOption, configure, cancellationToken);// 返回字节数组类型httpRemoteService.DeleteAsByteArray(requestUri, configure, cancellationToken);httpRemoteService.DeleteAsByteArray(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.DeleteAsByteArrayAsync(requestUri, configure, cancellationToken);await httpRemoteService.DeleteAsByteArrayAsync(requestUri, completionOption, configure, cancellationToken);// 返回 Stream 类型httpRemoteService.DeleteAsStream(requestUri, configure, cancellationToken);httpRemoteService.DeleteAsStream(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.DeleteAsStreamAsync(requestUri, configure, cancellationToken);await httpRemoteService.DeleteAsStreamAsync(requestUri, completionOption, configure, cancellationToken);// ============ HEAD ============// 返回 HttpResponseMessage 对象httpRemoteService.Head(requestUri, configure, cancellationToken);httpRemoteService.Head(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.HeadAsync(requestUri, configure, cancellationToken);await httpRemoteService.HeadAsync(requestUri, completionOption, configure, cancellationToken);// 返回目标 T 类型httpRemoteService.HeadAs<T>(requestUri, configure, cancellationToken);httpRemoteService.HeadAs<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.HeadAsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.HeadAsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Head<T>(requestUri, configure, cancellationToken);httpRemoteService.Head<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.HeadAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.HeadAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回字符串类型httpRemoteService.HeadAsString(requestUri, configure, cancellationToken);httpRemoteService.HeadAsString(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.HeadAsStringAsync(requestUri, configure, cancellationToken);await httpRemoteService.HeadAsStringAsync(requestUri, completionOption, configure, cancellationToken);// 返回字节数组类型httpRemoteService.HeadAsByteArray(requestUri, configure, cancellationToken);httpRemoteService.HeadAsByteArray(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.HeadAsByteArrayAsync(requestUri, configure, cancellationToken);await httpRemoteService.HeadAsByteArrayAsync(requestUri, completionOption, configure, cancellationToken);// 返回 Stream 类型httpRemoteService.HeadAsStream(requestUri, configure, cancellationToken);httpRemoteService.HeadAsStream(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.HeadAsStreamAsync(requestUri, configure, cancellationToken);await httpRemoteService.HeadAsStreamAsync(requestUri, completionOption, configure, cancellationToken);// ============ OPTIONS ============// 返回 HttpResponseMessage 对象httpRemoteService.Options(requestUri, configure, cancellationToken);httpRemoteService.Options(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.OptionsAsync(requestUri, configure, cancellationToken);await httpRemoteService.OptionsAsync(requestUri, completionOption, configure, cancellationToken);// 返回目标 T 类型httpRemoteService.OptionsAs<T>(requestUri, configure, cancellationToken);httpRemoteService.OptionsAs<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.OptionsAsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.OptionsAsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Options<T>(requestUri, configure, cancellationToken);httpRemoteService.Options<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.OptionsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.OptionsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回字符串类型httpRemoteService.OptionsAsString(requestUri, configure, cancellationToken);httpRemoteService.OptionsAsString(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.OptionsAsStringAsync(requestUri, configure, cancellationToken);await httpRemoteService.OptionsAsStringAsync(requestUri, completionOption, configure, cancellationToken);// 返回字节数组类型httpRemoteService.OptionsAsByteArray(requestUri, configure, cancellationToken);httpRemoteService.OptionsAsByteArray(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.OptionsAsByteArrayAsync(requestUri, configure, cancellationToken);await httpRemoteService.OptionsAsByteArrayAsync(requestUri, completionOption, configure, cancellationToken);// 返回 Stream 类型httpRemoteService.OptionsAsStream(requestUri, configure, cancellationToken);httpRemoteService.OptionsAsStream(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.OptionsAsStreamAsync(requestUri, configure, cancellationToken);await httpRemoteService.OptionsAsStreamAsync(requestUri, completionOption, configure, cancellationToken);// ============ TRACE ============// 返回 HttpResponseMessage 对象httpRemoteService.Trace(requestUri, configure, cancellationToken);httpRemoteService.Trace(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.TraceAsync(requestUri, configure, cancellationToken);await httpRemoteService.TraceAsync(requestUri, completionOption, configure, cancellationToken);// 返回目标 T 类型httpRemoteService.TraceAs<T>(requestUri, configure, cancellationToken);httpRemoteService.TraceAs<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.TraceAsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.TraceAsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Trace<T>(requestUri, configure, cancellationToken);httpRemoteService.Trace<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.TraceAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.TraceAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回字符串类型httpRemoteService.TraceAsString(requestUri, configure, cancellationToken);httpRemoteService.TraceAsString(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.TraceAsStringAsync(requestUri, configure, cancellationToken);await httpRemoteService.TraceAsStringAsync(requestUri, completionOption, configure, cancellationToken);// 返回字节数组类型httpRemoteService.TraceAsByteArray(requestUri, configure, cancellationToken);httpRemoteService.TraceAsByteArray(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.TraceAsByteArrayAsync(requestUri, configure, cancellationToken);await httpRemoteService.TraceAsByteArrayAsync(requestUri, completionOption, configure, cancellationToken);// 返回 Stream 类型httpRemoteService.TraceAsStream(requestUri, configure, cancellationToken);httpRemoteService.TraceAsStream(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.TraceAsStreamAsync(requestUri, configure, cancellationToken);await httpRemoteService.TraceAsStreamAsync(requestUri, completionOption, configure, cancellationToken);// ============ PATCH ============// 返回 HttpResponseMessage 对象httpRemoteService.Patch(requestUri, configure, cancellationToken);httpRemoteService.Patch(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PatchAsync(requestUri, configure, cancellationToken);await httpRemoteService.PatchAsync(requestUri, completionOption, configure, cancellationToken);// 返回目标 T 类型httpRemoteService.PatchAs<T>(requestUri, configure, cancellationToken);httpRemoteService.PatchAs<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PatchAsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.PatchAsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Patch<T>(requestUri, configure, cancellationToken);httpRemoteService.Patch<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PatchAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.PatchAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回字符串类型httpRemoteService.PatchAsString(requestUri, configure, cancellationToken);httpRemoteService.PatchAsString(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PatchAsStringAsync(requestUri, configure, cancellationToken);await httpRemoteService.PatchAsStringAsync(requestUri, completionOption, configure, cancellationToken);// 返回字节数组类型httpRemoteService.PatchAsByteArray(requestUri, configure, cancellationToken);httpRemoteService.PatchAsByteArray(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PatchAsByteArrayAsync(requestUri, configure, cancellationToken);await httpRemoteService.PatchAsByteArrayAsync(requestUri, completionOption, configure, cancellationToken);// 返回 Stream 类型httpRemoteService.PatchAsStream(requestUri, configure, cancellationToken);httpRemoteService.PatchAsStream(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.PatchAsStreamAsync(requestUri, configure, cancellationToken);await httpRemoteService.PatchAsStreamAsync(requestUri, completionOption, configure, cancellationToken);// ============ QUERY ============// 返回 HttpResponseMessage 对象httpRemoteService.Query(requestUri, configure, cancellationToken);httpRemoteService.Query(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.QueryAsync(requestUri, configure, cancellationToken);await httpRemoteService.QueryAsync(requestUri, completionOption, configure, cancellationToken);// 返回目标 T 类型httpRemoteService.QueryAs<T>(requestUri, configure, cancellationToken);httpRemoteService.QueryAs<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.QueryAsAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.QueryAsAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回 HttpRemoteResult<T>httpRemoteService.Query<T>(requestUri, configure, cancellationToken);httpRemoteService.Query<T>(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.QueryAsync<T>(requestUri, configure, cancellationToken);await httpRemoteService.QueryAsync<T>(requestUri, completionOption, configure, cancellationToken);// 返回字符串类型httpRemoteService.QueryAsString(requestUri, configure, cancellationToken);httpRemoteService.QueryAsString(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.QueryAsStringAsync(requestUri, configure, cancellationToken);await httpRemoteService.QueryAsStringAsync(requestUri, completionOption, configure, cancellationToken);// 返回字节数组类型httpRemoteService.QueryAsByteArray(requestUri, configure, cancellationToken);httpRemoteService.QueryAsByteArray(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.QueryAsByteArrayAsync(requestUri, configure, cancellationToken);await httpRemoteService.QueryAsByteArrayAsync(requestUri, completionOption, configure, cancellationToken);// 返回 Stream 类型httpRemoteService.QueryAsStream(requestUri, configure, cancellationToken);httpRemoteService.QueryAsStream(requestUri, completionOption, configure, cancellationToken);await httpRemoteService.QueryAsStreamAsync(requestUri, configure, cancellationToken);await httpRemoteService.QueryAsStreamAsync(requestUri, completionOption, configure, cancellationToken);

特定功能方法#

cs
// 下载文件httpRemoteService.DownloadFile(requestUri, destinationPath, onProgressChanged, fileExistsBehavior, configure, cancellationToken);await httpRemoteService.DownloadFileAsync(requestUri, destinationPath, onProgressChanged, fileExistsBehavior, configure, cancellationToken);httpRemoteService.DownloadFileWithConsoleProgress(requestUri, destinationPath, fileExistsBehavior, configure, cancellationToken);await httpRemoteService.DownloadFileWithConsoleProgressAsync(requestUri, destinationPath, fileExistsBehavior, configure, cancellationToken);httpRemoteService.Send(httpFileDownloadBuilder, cancellationToken);await httpRemoteService.SendAsync(httpFileDownloadBuilder, cancellationToken);// 上传文件httpRemoteService.UploadFile(requestUri, filePath, name, onProgressChanged, fileName, configure, cancellationToken);await httpRemoteService.UploadFileAsync(requestUri, filePath, name, onProgressChanged, fileName, configure, cancellationToken);httpRemoteService.UploadFileWithConsoleProgress(requestUri, filePath, name, fileName, configure, cancellationToken);await httpRemoteService.UploadFileWithConsoleProgressAsync(requestUri, filePath, name, fileName, configure, cancellationToken);httpRemoteService.Send(httpFileUploadBuilder, cancellationToken);await httpRemoteService.SendAsync(httpFileUploadBuilder, cancellationToken);// 发送 Server-Sent Events 请求httpRemoteService.ServerSentEvents(requestUri, onMessage, configure, cancellationToken);await httpRemoteService.ServerSentEventsAsync(requestUri, onMessage, configure, cancellationToken);httpRemoteService.Send(httpServerSentEventsBuilder, cancellationToken);await httpRemoteService.SendAsync(httpServerSentEventsBuilder, cancellationToken);// 压力测试httpRemoteService.StressTestHarness(requestUri, numberOfRequests, configure, HttpCompletionOption.ResponseContentRead, cancellationToken);await httpRemoteService.StressTestHarnessAsync(requestUri, numberOfRequests, configure, HttpCompletionOption.ResponseContentRead, cancellationToken);httpRemoteService.Send(httpStressTestHarnessBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);await httpRemoteService.SendAsync(httpStressTestHarnessBuilder, HttpCompletionOption.ResponseContentRead, cancellationToken);// 发送长轮询请求httpRemoteService.LongPolling(requestUri, onDataReceived, configure, cancellationToken);await httpRemoteService.LongPollingAsync(requestUri, onDataReceived, configure, cancellationToken);httpRemoteService.Send(httpLongPollingBuilder, cancellationToken);await httpRemoteService.SendAsync(httpLongPollingBuilder, cancellationToken);// 发送 HTTP 声明式请求httpRemoteService.Declarative(method, args);await httpRemoteService.DeclarativeAsync<T>(method, args);httpRemoteService.SendAs(httpDeclarativeBuilder);await httpRemoteService.SendAsAsync<T>(httpDeclarativeBuilder);