Does Parse.com support the use of etags
and if-none-match
for Conditional GETs? I'm working with a third party API that requires this as a must, to limit API calls to their server. Im using Cloud Code as my backend sending data to a Cordova/ionic hybrid app.
Thanks

- 8,417
- 3
- 41
- 60
-
1FYI you may wish to consider that Parse is shutting down in a year or so http://blog.parse.com/announcements/moving-on/ – cacsar Mar 02 '16 at 02:05
-
1I know but its open source now so I'll just have to host it myself at some point before then – garrettmac Mar 02 '16 at 02:32
2 Answers
Yes depending on your definition of support. You have the ability to set arbitrary headers on the request which is all that is required. However, it appears that you will need to either store the values yourself somewhere in Parse, or simply use fixed values you believe to be incorrect. You can retrieve etag values from the response headers. The RFC can guide you to the correct values. Note that Cloud Code on the open sourced Parse Server appears to provide increased access to the underlying JS interpreter rather than being sandboxed so you can access other mechanisms that may be more friendly than Parse's own HTTP object.
Yes, you can specify this by setting your cache policies as described in the documentation.
You also have the option of using cloud code in parse.com. A background job can check whether the data has changed and if not can send you the desired response.
-
It looks like you've linked to documentation for code that would run in iOS rather than code that would run as part of the cloud code which appears to be the scenario the question is asking about? – cacsar Mar 08 '16 at 23:41