I am trying the run the console application as a window service in dot-net core and able to create ,start ,stop and delete the service.
I am using PostAsync() method in application but the issue is that this method is working perfectly in console application but in window service most of the times PostAsync() never returned any response.
Any help would be highly appreciated. Thanks!
string abc=\"firstparameter\":\"English\",\"secondParameter\":\"Hindi\",\"Marks\":\"Result \"}";
var response = await client.PostAsync("url", new StringContent(ab, Encoding.UTF8, "application/json")).ConfigureAwait(false))
and By this way
var response = client.PostAsync("url", content).Result;
var objResult = response.Content.ReadAsStringAsync().Result;