I am working on an old ASP.NET MVC 4 website running on .NET v4.6.1 that I cannot change and I am calling a web api2 using HttpClient.
As you know, the call requires is an async call, however everywhere else, the code is not using async, and I decided to use refit to make my life easier.
However I am forced to do the following all over the shop:
myRefitHttpClient.GetSomestuff(whatever).GetAwaiter().GetResult();
Is there a better way than the above blocking code if you need to do sync over async?
Many thanks for any reply