[성현모] Web Operation 기능 추가
This commit is contained in:
39
Projects/WebClient/Web.Operation/Services/ProxyKMSService.cs
Normal file
39
Projects/WebClient/Web.Operation/Services/ProxyKMSService.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using SystemX.Core.Communication;
|
||||
using SystemX.Core.Services;
|
||||
using Web.Operation.Packet;
|
||||
using WebClient.Library.Config;
|
||||
|
||||
namespace Web.Operation.Services
|
||||
{
|
||||
public class ProxyKMSService
|
||||
{
|
||||
private readonly IServiceScopeFactory _scopeFactory;
|
||||
private readonly ConfigService<WebClientConfig>? _configService;
|
||||
|
||||
private string ApiHost = string.Empty;
|
||||
|
||||
public ProxyKMSService(IServiceProvider serviceProvider, IServiceScopeFactory scopeFactory, ConfigService<WebClientConfig> configService)
|
||||
{
|
||||
_scopeFactory = scopeFactory;
|
||||
_configService = configService;
|
||||
}
|
||||
|
||||
public async Task<RESPONSE> PostKms<REQUEST,RESPONSE>(string url, REQUEST request) where REQUEST : class where RESPONSE : class
|
||||
{
|
||||
|
||||
Http http = new Http();
|
||||
var res = await http.PostJsonAsync<REQUEST,RESPONSE>($"{url}", request);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public async Task<RESPONSE> PutKms<REQUEST, RESPONSE>(string url, REQUEST request) where REQUEST : class where RESPONSE : class
|
||||
{
|
||||
|
||||
Http http = new Http();
|
||||
var res = await http.PutJsonAsync<REQUEST, RESPONSE>($"{url}", request);
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user