title: How to delay the response of my Web API
body: <p>I am working on a Web API project and that has an Artist Web API Controller. On there, there is the <code>api/artist</code> method that is a <code>GET</code> for all artists.</p>
  
  <p>When making the call to this method, I would like a 3 second delay before I serve the data, how can I achieve this?</p>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>public class ArtistController : ApiController
  {
      private GlContext db = new GlContext();
  
      // GET api/Artist
      public IQueryable&lt;Artist&gt; GetArtists()
      {
          return db.Artists;
      }
  }
  </code></pre>
  
  <p>I know that you wouldn't want to do this in a production environment, but I am playing with preloaders, and in order to test them properly I need to introduce this delay.</p>