示例#1
0
        public async Task Transfer(TransferDTO transferDTO)
        {
            var uri             = "https://localhost:5001/api/banking";
            var transferContent = new StringContent(JsonConvert.SerializeObject(transferDTO), Encoding.UTF8, "application/json");

            //var clientFactory = app.ApplicationServices.GetService<IHttpClientFactory>();
            //using (var httpClient = _httpClientFactory.CreateClient("Tracer"))
            //{
            //    var response = await httpClient.PostAsync(uri, transferContent);
            //    response.EnsureSuccessStatusCode();
            //}

            //using (var httpClient = _httpClientFactory.CreateClient("Jaeger"))
            //{
            //    var response = await httpClient.PostAsync(uri, transferContent);
            //    response.EnsureSuccessStatusCode();
            //}

            var response = await _bankingService.Banking(transferDTO);


            //var response = await _apiClient.PostAsync(uri, transferContent);
            //response.EnsureSuccessStatusCode();
        }