I'm writing a program that makes POST and GET calls asynchronously. The issue I'm running into is that each POST and GET sometimes have different headers/host parameters.
I have HttpClient initialized outside my main() class and inside my main class I have the following,
client.DefaultRequestHeaders.Add("Host", "website1.com");
and for another GET/POST request I want to have website2 in the HOST parameter,
client.DefaultRequestHeaders.Add("Host", "website2.com");
but they collide and it's throwing an error because it already exists. What's the proper way to approach this?