rfc2616 is pretty bare on the subject, and basically defines a header for people to use when they see fit. The only obvious case I can see is a 416 response. I'm new to rest and was just wondering whether there existed conventions on when to respond with this header.
Asked
Active
Viewed 310 times
1 Answers
1
at least one example comes to my mind:
you can have GET /book
method in your service
and you would like to add possibility to fetch only particular pages
instead of new method like /bookpage
you can accept-ranges: pages
and return only relevant page(s)
here is example of this http://byterot.blogspot.com/2012/07/range-header-asp-net-web-api-entity-pagination.html and http://otac0n.com/blog/2012/11/21/range-header-i-choose-you.html
also, this is discussed here Paging in a Rest Collection

Community
- 1
- 1

Iłya Bursov
- 23,342
- 4
- 33
- 57
-
Yeah I'm planning on using it for a similar case to paging, but was thinking it'd be more useful for this header to be returned via a HEAD request. Seems kind of weird to send it in a GET considering they're already either retrieving the whole or part of a resource. You're right though in that a 200/206 responses seem to have reached a point of convention from the resources floating around the net. Hopefully you don't mind me waiting on selecting an answer for a day or two. I do appreciate your input. – aaaaaa May 18 '16 at 23:00