-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Last-Modified header #190
Comments
See also http://flask.pocoo.org/snippets/95/ |
+1 |
I think this is out-of-scope for Flask-Restless, as it depends on how the user implements the last update time in the model. It can be implemented by a preprocessor, which could check the headers, the last-update time, the etag, etc., then raise a |
Agree. I like what @jfinkels proposes because you don't have to modify your model or add a new field just because you want this common feature. Instead, considering that you have some timestamp field, you only have to follow a recipe. Another way to do this, could be by somehow implementing a function, maybe a decorator, that given a model field, it generates the header info and the proper checker to check whether it has been modified or not. I like this approach too, because you offer the functionality, but you are free to choose which field (or even fields) are those that need to be checked before updating. |
and possible ETag?
The text was updated successfully, but these errors were encountered: