Conversation
…Not Modified responses.
Thanks for your pull request, @xslim. There's a lot in here other than the foreign ID stuff, so it's going to take some time for me to determine what I should take from this. Bear with me for a moment. |
Sorry for a lot of commits, I'm trying to use the library in current app development, and I stuccoed with the problem of entities are not saved in DB. So some of the commits are fixing this issue. |
Also I've made implementation for sending If-Modified-Since and working with 304 Not Modified… but this work is currently in my gist https://gist.github.com/3855430 If you have any comments how to improve the code for pull request - please tell me I'll do that. |
No worries at all—thanks for your contributions. As it were, I just added |
You developed What I did in my gist, is developed The example implementation on rails side is #AreasController
def index
@areas = parent.areas
if stale?(last_modified: @areas.max(:updated_at))
respond_with @areas
end
end So I get the last modified area in database, and send this info to server. Server checks it against his DB and returns just :304 if nothing changed, or :200 with the list of areas if there were changes. This saves bandwidth. |
https://github.com/xslim/AFIncrementalStore/commit/06041256e5c76190fba714f4b6d8a4c2aff8c180 prevents crashing when server sends To make // 304 Not-Modified
[AFJSONRequestOperation addAcceptableStatusCodes:[NSIndexSet indexSetWithIndex:304]]; |
Should I change my pull request to reflect your latest commits? |
As of e8c6472, AFIncrementalStore is no longer being actively maintained. Thank you for your contributions; my sincere apologies for any inconvenience this may have caused. |
Currently relations are supported by searching
relationName
inrepresentation
This hack allows building relations by using
relationName_id
orrelationName_ids
, as many Ruby on Rails engines return.