log .
This commit is contained in:
@@ -13,11 +13,13 @@ public class GainfosController : ControllerBase
|
||||
{
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly ILogger<GainfosController> _logger;
|
||||
|
||||
public GainfosController(IHttpClientFactory httpClientFactory, IConfiguration configuration)
|
||||
public GainfosController(IHttpClientFactory httpClientFactory, IConfiguration configuration, ILogger<GainfosController> logger)
|
||||
{
|
||||
_httpClientFactory = httpClientFactory;
|
||||
_configuration = configuration;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -33,6 +35,8 @@ public class GainfosController : ControllerBase
|
||||
var hostName = _configuration.GetSection("HostName").Value;
|
||||
var httpClient = _httpClientFactory.CreateClient();
|
||||
|
||||
_logger.LogInformation("token:{token}", token);
|
||||
|
||||
try
|
||||
{
|
||||
var faceBytes = await httpClient.GetByteArrayAsync($"https://{hostName}/api/basic/gainfos/face?token={token}");
|
||||
|
||||
Reference in New Issue
Block a user