Hi again,
No one seemed interested in the discussion here:
Fair enough! I have another question for anyone currently using ERRest.
With the current code-base, the HTTP response header Content-Range is emitted when the "Range" header is sent in the Request and there are actual results of the fetch.
I've altered this in a couple of my apps to include the Content-Range header when there are results in the batch fetcher, ignoring whether the Range request header is present.
This way some of my clients can have some visibility of the total result count of the request, for pagination or future range searches/retrievals.
So my question: does anyone do something similar, or know of a better, perhaps more valid, way of achieving this? What I've described is working just fine, but if there's a better way I'll use it.
Lastly, in those apps I also include the "Access-Control-Expose-Headers" header in the response, because some clients need that to be able to even get the other headers, headers like "Content-Range" :)
Is anyone coming at this this issue? Is this something that would benefit anyone else?
Aside: I understand there are differing attitudes to utilising Content-Range (and others) in this manner as part of the overall uniform interface. Happy to discuss that - also happy to not discuss it :)
Regards,
-- Matt
|