Siesta currently does not support this. It can’t automatically do so in the general case, since there is no universally valid definition of “changed” for every type of resource content. (Even if the resource content is Equatable
, and that happens to match the definition of “changed” you want, should some headers should be included in the notion of equality? Which ones?)
The 304 is a nice bright line: the server, arbiter of truth for the resource, declares it semantically unchanged — and all the API-specific rules about what “unchanged” means live on the server.
This does, however, seem like a nice thing to be able to customize. I recommend filing an issue if you’d like to see it implemented.
In the meantime, you can do it by hand: make your resource payload conform to Equatable
and check it in your resource observers. If you have performance-sensitive updates, an approach with this shape sometimes makes more sense anyway, since you can check for partial changes (e.g. only some elems in a collection changed).