Consider the following URIs where the server returns a representation corresponding to the nth Fibonacci number.
GET /fib/0 ==> { value: 0, _links: { next: { href: '/fib/1' } } }
GET /fib/1 ==> { value: 1, _links: { next: { href: '/fib/2' } } }
GET /fib/2 ==> { value: 1, _links: { next: { href: '/fib/3' } } }
...
GET /fib/73 ==> { value: 806515533049393, _links: { next: { href: '/fib/74' } } }
... etc ...
Given the constraints of a strict interpretation of REST, what should the server return when it receives the following request?
GET /fib
According to W3’s Dereferencing HTTP URIs, because I cannot return an infinite sequence, it looks like I should return an
HTTP 303 - See Otherredirect to another URI (e.g./fib/Information) which contains additional related information about the Fibonacci sequence such as a human-readable description, an algorithm to compute it, or an RDF description of the aggregation. I should support content negotiation to allow consumers to select an appropriate representation.