title: Adding Pagination to Link Headers in Web Api 2
body: <p>Currently in my Rest service I return paged data using the model that follows.</p>
  
  <pre><code>public class PagedResults&lt;T&gt;
  {
      public List&lt;LinkModel&gt; Links { get; set; }
      public int TotalCount { get; set; }
      public double TotalPages { get; set; }
      public List&lt;T&gt; Results { get; set; }
  }
  </code></pre>
  
  <p>This works alright, but I came across the following post. </p>
  
  <p><a href="http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#pagination" rel="nofollow noreferrer">http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#pagination</a></p>
  
  <p>My curiosity was peaked, it mentions using the HTTP headers to return links and pagination information.  Although the post mentions RFC 5988, I was unable to unravel what that really means?  Was it every actually adopted as a standard of some sort?  </p>
  
  <p>The question here is in ASP.Net Web API 2, is there any support for adding pagination information in the link header?  I used intellisense to peruse HTTP response headers and I did not find Links, or anything similar.  </p>
  
  <p>I found this post, but it doesn't really answer my question of ease of doing this in Web API 2.</p>
  
  <p><a href="https://stackoverflow.com/questions/9742380/link-headers-vs-link-elements-for-restful-json">Link headers vs link elements for RESTful JSON</a></p>