|
|
@ -32,7 +32,7 @@ namespace WebApplication1.Controllers |
|
|
|
ip = configuration.GetSection("Configs:SystemIp").Value; |
|
|
|
ip = configuration.GetSection("Configs:SystemIp").Value; |
|
|
|
port = configuration.GetSection("Configs:Port").Value; |
|
|
|
port = configuration.GetSection("Configs:Port").Value; |
|
|
|
httpClient = httpClientFactory.CreateClient(); |
|
|
|
httpClient = httpClientFactory.CreateClient(); |
|
|
|
httpClient.BaseAddress = new Uri("http://143.120.5.116:8080"); // new Uri($"http://{ip}:{port}"); |
|
|
|
httpClient.BaseAddress = new Uri($"http://{ip}:{port}"); |
|
|
|
httpClient.DefaultRequestHeaders.Add("Accept", "application/json"); |
|
|
|
httpClient.DefaultRequestHeaders.Add("Accept", "application/json"); |
|
|
|
httpClient.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample"); |
|
|
|
httpClient.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample"); |
|
|
|
httpClient.DefaultRequestHeaders.ConnectionClose = true; |
|
|
|
httpClient.DefaultRequestHeaders.ConnectionClose = true; |
|
|
|