title: Invoke method/Do action before every POST/GET request .NET Core
body: <p><strong>What I am trying to achieve</strong> - My application is simply ASP .Net Core application. <strong>It is not Web API.</strong> I want to execute method before every post/get request from my app to external sources, for example:
  I am sending a post request, to check SSL expiry date to some website API and it returns me a response. According to the response I am sending another request or not. I don't want to place call method statement before every request, I would like to do it globally. </p>
  
  <p>I was trying to achieve this based on <a href="http://www.sulhome.com/blog/10/log-asp-net-core-request-and-response-using-middleware" rel="noreferrer">http://www.sulhome.com/blog/10/log-asp-net-core-request-and-response-using-middleware</a></p>
  
  <p>As it occurs, this middleware works(I have it working) only for internal requests(routing requests inside application). </p>
  
  <p>Is there any possibility to do it for all requests?</p>
  
  <p>Thanks in advance</p>