distributed-computing/tasks/moiseev-vv/lab_3/worker-1/Program.cs

16 lines
375 B
C#
Raw Normal View History

2023-11-14 23:30:34 +04:00
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/", async () =>
{
var result = "Hello World 1!";
var httpClient = new HttpClient();
var secondWorkerResponse = await httpClient.GetStringAsync("http://worker-2:80/");
result += " Response from worker-2: " + secondWorkerResponse;
return result;
});
app.Run();