diff --git a/Admin.Bodk.Device/obj/Debug/net8.0/Admin.Bo.C1CC57A0.Up2Date b/Admin.Bodk.Device/obj/Debug/net8.0/Admin.Bo.C1CC57A0.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/Admin.NET.Application/obj/Debug/net8.0/Admin.NE.E81E0593.Up2Date b/Admin.NET.Application/obj/Debug/net8.0/Admin.NE.E81E0593.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/Admin.NET.Core/Entity/SysConfig.cs b/Admin.NET.Core/Entity/SysConfig.cs index 56d6ecf..b78f63d 100644 --- a/Admin.NET.Core/Entity/SysConfig.cs +++ b/Admin.NET.Core/Entity/SysConfig.cs @@ -1,7 +1,4 @@ -// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 -// -// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 - + namespace Admin.NET.Core; /// diff --git a/Admin.NET.Core/Service/Server/ApiService.cs b/Admin.NET.Core/Service/Server/ApiService.cs new file mode 100644 index 0000000..ae31c4a --- /dev/null +++ b/Admin.NET.Core/Service/Server/ApiService.cs @@ -0,0 +1,20 @@ + +namespace Admin.NET.Core.Service; + +public class ApiService +{ + private readonly HttpClient _httpClient; + + public ApiService() + { + _httpClient = new HttpClient(); + } + + public async Task GetApiResponseAsync(string url) + { + HttpResponseMessage response = await _httpClient.GetAsync(url); + response.EnsureSuccessStatusCode(); + string responseBody = await response.Content.ReadAsStringAsync(); + return responseBody; + } +} \ No newline at end of file diff --git a/Admin.NET.Core/Service/Server/SysServerService.cs b/Admin.NET.Core/Service/Server/SysServerService.cs index e73baf1..9b75037 100644 --- a/Admin.NET.Core/Service/Server/SysServerService.cs +++ b/Admin.NET.Core/Service/Server/SysServerService.cs @@ -1,8 +1,4 @@ -// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 -// -// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 - -using AngleSharp.Html.Parser; +using AngleSharp.Html.Parser; using AspNetCoreRateLimit; using Lazy.Captcha.Core; using Magicodes.ExporterAndImporter.Pdf; @@ -21,6 +17,26 @@ public class SysServerService : IDynamicApiController, ITransient public SysServerService() { } + + /// + /// 跨服务调用 + /// + /// + [DisplayName("跨服务调用")] + public async Task GetServerOther() + { + //ApiService apiService = new ApiService(); + //string url = "http://192.168.88.111:8080/api/M9Info/Info"; + try + { + //return await apiService.GetApiResponseAsync(url); + return "this is a string"; + } + catch (HttpRequestException e) + { + return $"Request error: {e.Message}"; + } + } /// /// 获取服务器配置信息 diff --git a/Admin.NET.Core/bin/Debug/net8.0/refs/System.Text.Json.dll b/Admin.NET.Core/bin/Debug/net8.0/refs/System.Text.Json.dll new file mode 100644 index 0000000..b34808b Binary files /dev/null and b/Admin.NET.Core/bin/Debug/net8.0/refs/System.Text.Json.dll differ diff --git a/Admin.NET.Web.Core/obj/Debug/net8.0/Admin.NE.317AB46F.Up2Date b/Admin.NET.Web.Core/obj/Debug/net8.0/Admin.NE.317AB46F.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/Admin.NET.Web.Entry/bin/Debug/net8.0/Admin.NET.Web.Entry b/Admin.NET.Web.Entry/bin/Debug/net8.0/Admin.NET.Web.Entry new file mode 100755 index 0000000..21a405b Binary files /dev/null and b/Admin.NET.Web.Entry/bin/Debug/net8.0/Admin.NET.Web.Entry differ diff --git a/Admin.NET.Web.Entry/obj/Debug/net8.0/Admin.NE.12B9794D.Up2Date b/Admin.NET.Web.Entry/obj/Debug/net8.0/Admin.NE.12B9794D.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/Admin.NET.Web.Entry/obj/Debug/net8.0/apphost b/Admin.NET.Web.Entry/obj/Debug/net8.0/apphost new file mode 100755 index 0000000..21a405b Binary files /dev/null and b/Admin.NET.Web.Entry/obj/Debug/net8.0/apphost differ