Problem
I have a GET api method to retrieve a site configuration. For this, I use the GetAsync() and GetAsync() .
HttpResponseMessage response = await client.GetAsync("api/{0}/config", id);
Since I need this configuration on the site, I planned to use a global action filter for this.
Question
How can I call the async method in an MVC action filter? Or is there a better solution to this problem?
I looked at a few SO ( Asynchronous Action Filter in MVC 4 ) questions, but I did not find a satisfactory solution.
asp.net-mvc async-await
Colin bacon
source share